WordPress.org

Ready to get started?Download WordPress

Forums

Breadcrumb NavXT
Root page displaying twice (20 posts)

  1. duncmorley
    Member
    Posted 3 years ago #

    I have just updated this plugin to 3.9.0 and my breadcrumbs on my custom post type pages have now got the root page appearing twice, 1 with a link to the root page, and another with a link to the current page.

    It was working fine before the update so have managed to find a version of the plugin on my machine and reverted back until this is fixed.

    Just thought you should you know though.

  2. John Havlik
    Member
    Plugin Author

    Posted 3 years ago #

    Are you by chance trying to use the "root page" option for pages? If so that is probably causing it. You're probably best off sticking with 3.8.1 until 4.0 is released. I'll have to try to reproduce this. Just note that there will not be a bug fix version of 3.9, the next release will be 4.0 and any fixes will be rolled into it.

  3. casabsolute
    Member
    Posted 3 years ago #

    We're having the exact same issue.

    Looks like the breadcrumb link to the current page is happening because there is an unclosed a href link - not sure what's causing it, though. :(

  4. becky.absolute
    Member
    Posted 3 years ago #

    I believe I found the source of the issue. It is the do_home() function in the breadcrumb_navxt_class.php file. There are 2 sections of the code that is adding a crumb for the post type archive. The specific cases are:

    • else if(isset($type->post_type) && !$this->is_builtin($type->post_type))
    • else if(isset($type->taxonomy) && !$this->is_builtin($wp_taxonomies[$type->taxonomy]->object_type[0]))

    In our case, the custom post types we created did not have an archive set up when the CPT was created (i.e. has_archive = false). We have a page in our system that has some content on it and then the list of the posts of our CPT. This page is set as the root in the options for the plugin.

    Since the code for the plugin is not checking if the CPT actually has an archive before including a link to the archive, that is where the double crumb issue rears its head. The same thing happens on the taxonomy page for the taxonomy for the CPT.

    I tweaked things on my local copy to check if the post type has an archive. If it does, then it includes the crumb; otherwise it skips it.

    Have you set a release date for version 4.0 yet since you won't be releasing a bug fix for 3.9?

  5. John Havlik
    Member
    Plugin Author

    Posted 3 years ago #

    I know the do_home function is the culprit, as soon as duncmorley said something, I knew what was doing it. I really don't want to keep modifying do_home, it's already too large, and quite an ugly mess (you probably noticed that). In 4.0 it is the first thing I have to refactor in the bcn_breadcrumb_trail class.

    You've pointed out a second method to cause the issue, which I need to test against while refactoring for 4.0.

    4.0 is due late July/early August. This month is already shot due to a very high priority project that must be done by the end of the month. I may be able to work some on 4.0 as part of this project, though that will be later this month.

  6. casabsolute
    Member
    Posted 3 years ago #

    Thanks, mtekk - and no worries. Completely sympathize with you re: higher priority projects. Will hold tight here and not upgrade till 4.0. Cheers!

  7. John Havlik
    Member
    Plugin Author

    Posted 2 years ago #

    This should be fixed in SVN trunk right now. I will post when an Alpha is available (no settings migration script is available right now).

  8. duncmorley
    Member
    Posted 2 years ago #

    Is this issue now fixed in version 4.0? I have seen the change log does say:

    Bug fix: Custom post type archives now respect the root page setting.

  9. John Havlik
    Member
    Plugin Author

    Posted 2 years ago #

    I fixed two things that I think could have caused it. Are you still experiencing the issue in 4.0?

  10. duncmorley
    Member
    Posted 2 years ago #

    No, not yet, I was getting errors about headers already being sent once activated though.

  11. John Havlik
    Member
    Plugin Author

    Posted 2 years ago #

    Multi site setup? If so, grab the SVN Trunk/development version.

  12. duncmorley
    Member
    Posted 2 years ago #

    Yes it is, where do I get that from?

  13. duncmorley
    Member
    Posted 2 years ago #

  14. duncmorley
    Member
    Posted 2 years ago #

    Just need to double check I'm installing this correctly. Under the Network Admin I am getting 2 plugins, Breadcrumb NavXT and Breadcrumb NavXT Display Supplicant. Should both be activated from the Network Admin? Also, it is prompting me to install 4.0 of the Breadcrumb NavXT Display Supplicant plugin. When i do i get the following errors:

    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\website\wp-content\plugins\breadcrumb-navxt\breadcrumb_navxt_admin.php on line 591

    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\website\wp-content\plugins\breadcrumb-navxt\breadcrumb_navxt_admin.php on line 646

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\website\wp-content\plugins\breadcrumb-navxt\breadcrumb_navxt_admin.php:591) in C:\xampp\htdocs\website\wp-includes\pluggable.php on line 866

    Can you help please?

  15. John Havlik
    Member
    Plugin Author

    Posted 2 years ago #

    Ignore the display supplicant plugin (don't activate it), you don't need it. It is where the display_nested functions are going to live, once I have the time to complete it.

  16. duncmorley
    Member
    Posted 2 years ago #

    Thanks for your help.

  17. tigerpaper
    Member
    Posted 2 years ago #

    Hi Guys,

    I'm experiencing the same issue... tried the older version and the latest.

    I'm getting a double display on my custom post type landing page (archive-videos.php) where the first 'videos' is a link to the current page and the second is just text. This only happens on this landing page. Single 'videos' pages are fine.

  18. tigerpaper
    Member
    Posted 2 years ago #

    Also, a different issue to bump this one... If I append a query string like this:
    http://localhost:8888/tag/something/?post_type=videos I get no breadcrumbs.
    http://localhost:8888/tag/something/ works. Anyone know a solution to this?

  19. John Havlik
    Member
    Plugin Author

    Posted 2 years ago #

    For the /tag/something/?post_type=videos one, that's a bug, I've added it to my test cases and it will be fixed in the next release. Thanks for reporting that one.

    As for the first issue, is the landing page a post archive page? Or some combination of something else?

  20. tigerpaper
    Member
    Posted 2 years ago #

    Hi mtekk,
    Thanks for the reply!

    Yeah, it's an archive page (archive-videos.php). WordPress automatically uses this as the landing page located at http://localhost:8888/videos/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic