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.
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.
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. 🙁
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))
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?
I know the
do_homefunction 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.
Thanks, mtekk – and no worries. Completely sympathize with you re: higher priority projects. Will hold tight here and not upgrade till 4.0. Cheers!
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).
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.
I fixed two things that I think could have caused it. Are you still experiencing the issue in 4.0?
No, not yet, I was getting errors about headers already being sent once activated though.
Multi site setup? If so, grab the SVN Trunk/development version.
Actually i got it. it’s http://downloads.wordpress.org/plugin/breadcrumb-navxt.zip
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?
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.
- The topic ‘[Plugin: Breadcrumb NavXT] Root page displaying twice’ is closed to new replies.