Open richardbuff opened 1 month ago
Hi @richardbuff
Thanks for using the Yoast SEO plugin and for creating the issue. I tested it on my lab site by installing the Yoast SEO 22.9 version and added the breadcrumb shortcode to a post. Then I checked the post and noticed that the category was outputted with the trailing slash (based on my permalink settings) without any issue.
After that, I updated the plugin to 23.2, which is the latest version that was released on the last day, and noticed that the category breadcrumb is still outputted with the trailing slash without any issues. You can find the screencast here for your reference: https://www.loom.com/share/12f7de7f59f045fc86e32b37b9b127ae. Did I missed any step while replicating the issue you have mentioned, please let me know.
@josevarghese Thanks for the response. Watch these two screencasts I made. In the first one, you can see on the second test post the breadcrumbs no longer work. In the second video, you can see me rollback and they suddenly start working.
Hi @richardbuff
Thanks for the video. When I tested with another site, I could confirm this issue with the category missing from the breadcrumbs on the post. I escalated it to our development team internally to take a closer look at this; we will keep you posted.
Thanks for your patience.
The issue only occurs on non-production websites (like websites generated using WP Local) or when the indexable is disabled, and it does not happen on live sites. That's why I could not replicate it during the initial testing, but it can now be replicated when tested using the Local WP.
I spent several hours debugging kind of the same issue with Yoast breadcrumbs that only occurs in local or staging environments. But it took me a while to understand that. It seems that Yoast breadcrumbs rely heavily on the indexables and hierarchy tables, which are typically only generated/updated in production environments.
To reproduce, I used the Yoast Test Helper plugin and clicked "Reset Indexables tables & migrations," which emptied the yoast_indexable and yoast_indexable_hierarchy tables. In a non-productive environment, these tables don't repopulate, leading to incomplete breadcrumbs. For example, instead of showing Home > Parent > Child, it only showed Home > Child. See #21539.
For consistency, breadcrumbs should not produce different results depending on the environment.
I can confirm that this issue has impacted a production environment at least on Pantheon
@aaronware, can you check whether the wp-config.php is set with the value as the environment variable as development or not? This issue only occurs on websites set as development or local, where the SEO Data Optimization is disabled.
We've noticed that posts (or in our case, WooCommerce products) that already have categories assigned to them continue to show the category. If you recategorise the post (product) however, the old category continues to be shown in the breadcrumbs.
Please give us a description of what happened
With version 23.1, if you create a new post and assign it a category, the proper category breadcrumbs trail will not show.
To Reproduce
Step-by-step reproduction instructions
Yoast with Breadcrumbs for post types > Posts > Categories
[wpseo_breadcrumb]
shortcode and the category breadcrumb trail is missing. The same behavior is present usingyoast_breadcrumb()
build
function here makes the trail reappear: https://github.com/Yoast/wordpress-seo/blob/trunk/src/builders/indexable-hierarchy-builder.php#L120-L122Technical info
Used versions