WordPress.org

Ready to get started?Download WordPress

Forums

List Custom Taxonomy Widget
[resolved] dropdown does not work (16 posts)

  1. yajanssen
    Member
    Posted 1 year ago #

    When I save my custom taxonomy list as a dropdown, the go button brings me to Error 404 – Page not found.
    When I save it as a preview mode, I get the right page.
    What should I do?
    http://screencast.com/t/CPgzS0a4bY
    When I check my widget later the widget is gone from the footer, any reason?
    Also is there any chance that I can put the widget or the list in a page?

    http://wordpress.org/extend/plugins/list-custom-taxonomy-widget/

  2. Nick Halsey
    Member
    Plugin Author

    Posted 1 year ago #

    Try flushing your permalinks. There is a bug in WordPress where you sometimes need to "refresh" the permalink structure to make new custom post types and/or custom taxonomy urls work. I think in your case the redirect isn't working from the dropdown submit page to the taxonomy page, but the direct link from the list view is working fine.

    To flush the permalinks, go to settings -> permalinks and click save (no need to change any settings). Does that fix it?

  3. yajanssen
    Member
    Posted 1 year ago #

    You are right: redirect isn't working from the dropdown submit page to the taxonomy page, but the direct link from the list view is working fine.

    I tried to do what you said, but it did not work
    http://screencast.com/t/HtrzlSGj
    Am I doing something wrong?

    It would be a dream come true, if it would work.

  4. Nick Halsey
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, that's the correct place to flush permalinks, so that's not the issue. I can't get it to work, but perhaps seeing the html would help. Could you put the dropdown somewhere so I can look at what code it's outputting? The issue is definitely that it doesn't think the category exists, which is why it 404s instead of going to the homepage...

  5. yajanssen
    Member
    Posted 1 year ago #

    I am not really too savvy, could you tell me how and where I can put the dropdown?

  6. yajanssen
    Member
    Posted 1 year ago #

    My website is http://www.ctproductsandservices.com and I have the dropdown on http://ctproductsandservices.com/add-a-listing/
    Footer 1
    Hope that is it?

  7. Nick Halsey
    Member
    Plugin Author

    Posted 1 year ago #

    That's what I wanted to see. Unfortunately, I'm still having trouble finding the issue. I did find one small bug with the dropdown html code, but I'm pretty sure it won't fix your issue. I think we can consider it working in your case once http://ctproductsandservices.com/?cat=602 stops going to a 404. I think this isn't a plugin issue but an issue with something else in your installation.

    It's possible that there was a WordPress bug in 3.4 that was fixed in 3.5, so it wouldn't hurt to update (unless you know that you can't for any reason). If that doesn't fix it (I doubt it will), then I'm running out of ideas.

    Also, to address your other original question, you can display custom taxonomies on pages by putting some php in your templates, use the wp_dropdown_categories() or wp_list_categories() functions.

  8. yajanssen
    Member
    Posted 1 year ago #

    One more try. Is there any chance to have a third choice in the widget. To save it in a list form, like the preview, but that it can be published in a list form. The line spacing should be single.
    http://screencast.com/t/QsePQ07sIw
    http://screencast.com/t/Fi2a4htjC3w

  9. Nick Halsey
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry, but I'm not sure what you mean by "preview mode". By default, the plugin displays the categories as a list, but you can switch to a dropdown if desired. So it should just do what you want if you leave the display as dropdown box unchecked.

    In terms of single vs. double spacing, that's just something you'd need to change in your theme's css (styling rules). And columns can also be done with the css (if you don't care about old IE).

  10. Nick Halsey
    Member
    Plugin Author

    Posted 1 year ago #

    I found a bug in the dropdown redirect handling that should be resolved in plugin version 3.3, which I just released. Hopefully that solves your original issue.

  11. Herm71
    Member
    Posted 9 months ago #

    Hello! Last night I found this plugin and installed it and I'm getting the exact same problem as yajanssen. The difference is that I'm running WP 3.7. I checked out your changelog and it looks like you fixed this bug for WP 3.6; is there a chance that 3.7 broke it again? At any rate, like I said, this thread describes my experience exactly.

  12. Nick Halsey
    Member
    Plugin Author

    Posted 8 months ago #

    There are a lot of additional issues with links in the dropdown display mode at the moment; I spend a while trying to get it to work a while ago but haven't had a chance to revisit it. It's possible that the issue was re-introduced in WordPress 3.7, as I was probably testing on 3.7 alpha when I tried to resolve it again. Basically, I just need to determine how to get WordPress to redirect from a /?taxonomy=term type url to the actual url, but there is pretty much no documentation in this area. In the meantime, I know that the list display mode works, so you may need to use it instead for now (I know it can take up a lot of space, though).

  13. baignoire
    Member
    Posted 8 months ago #

    hi nick,

    using plugin 3.3 and wp 3.7.1, i also meet the 404 error bug with dropdowns : dropdown form sends me to : http://rafonthenet.net/pgearth/?country=http%3A%2F%2Frafonthenet.net%2Fpgearth%2Fcountry%2Ffr%2F while it should only send to http://rafonthenet.net/pgearth/?country=fr which would point to the right page.

    having a look at the form, it looks like the values for the select options are the full url : "... <option class="level-1" value="http://rafonthenet.net/pgearth/country/fr/">   France (4)</option>..." and that if should work fine if you only had the taxonomy slug as the value instead of the whole url.
    so i changed line 289 of list-custom-taxonomy-widget.php for :

    $getTax = get_term( $term, $term->taxonomy );
    $taxSlug = $getTax->slug;

    and line 298 for ` $output.= "\t" . '<option' . ' class="' . esc_attr( $class_name ) . '" value="' . $taxSlug . '">' . esc_html( $text ) . '</option>' . "\n";
    `

    as i far as i tested, with %postname% as permalink in my case, this works fine on my install (http://rafonthenet.net/pgearth) for dropdown as well as lists.

    last thing : i m not pro coder, just a leisure occasional php user, so i don't guarantee this will help you for sure, at least it solved my case..

    thanks for the plugin anyway, will gladly use it and review when the dropdown bug is solved ;)

    regards
    raf

  14. yajanssen
    Member
    Posted 8 months ago #

    Herm71, are you looking to have a list like mine on a separate page http://ctproductsandservices.com/directory-of-members/, or are you set on having a dropdown.

  15. Nick Halsey
    Member
    Plugin Author

    Posted 8 months ago #

    baignoire, it looks like that's a step in the right direction, although it still breaks the built-in post_tag taxonomy. I'll keep exploring it.

    In theory the url site_url]/?[taxonomy]=[term] (which is what that does, of course) should work, but in practice there are some issues. And results may differ based on the current permalinks setting.

  16. jlarson
    Member
    Posted 7 months ago #

    I got it to work by changing

    $output.= "\t" . '<option' . ' class="' . esc_attr( $class_name ) . '" value="' . esc_url( $url ) . '">' . esc_html( $text ) . '</option>' . "\n";

    to

    $output.= "\t" . '<option' . ' class="' . esc_attr( $class_name ) . '" value="' . $term->slug . '">' . esc_html( $text ) . '</option>' . "\n";

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic