Skip to content

Fix breadcrumb order#15175

Merged
hansjovis merged 2 commits intotrunkfrom
fix-breadcrumb-order
May 14, 2020
Merged

Fix breadcrumb order#15175
hansjovis merged 2 commits intotrunkfrom
fix-breadcrumb-order

Conversation

@herregroen
Copy link
Copy Markdown
Contributor

@herregroen herregroen commented May 13, 2020

#15057 Summary

This PR can be summarized in the following changelog entry:

  • Fixes an issue where breadcrumbs were being saved in reversed order.

Relevant technical choices:

  • The indexable hierarchy table is truncated in a migration. This table is only ever used as a cache and thus no reindex is required. For sites with very long breadcrumbs and/or a lot of terms the first request to each post may be slightly slower ( generating the breadcrumbs would be about the same speed as it was in 13.5 ).

Test instructions

This PR can be tested by following these steps:

  • Make sure you have breadcrumbs at least 5 layers deep: home -> grandparent term -> parent term -> child term -> post.
  • Save that post with the child term as the primary category. Check the breadcrumb.
  • Save that post with the parent term as the primary category. Check the breadcrumb.
  • Do the same with a custom post type and custom taxonomy.
  • Do the same with nested pages ( home -> grandparent page -> parent page -> child page ).
  • In all cases the breadcrumb shown in both schema and by adding the breadcrumb to your theme as described here should show the correct order.

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Documentation

  • I have written documentation for this change.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

Fixes #15173
---- For acceptance testing -----
Probably fixes #15261 and #15251. Close these issues if fix confirmed in 14.2 RC

@IreneStr IreneStr added the 0.5 label May 14, 2020
@hansjovis hansjovis self-assigned this May 14, 2020
Copy link
Copy Markdown
Contributor

@hansjovis hansjovis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: 👍

@hansjovis
Copy link
Copy Markdown
Contributor

Acceptance test: ✅

@hansjovis hansjovis merged commit f2e54f5 into trunk May 14, 2020
@hansjovis hansjovis deleted the fix-breadcrumb-order branch May 14, 2020 12:43
@hansjovis hansjovis removed their assignment May 14, 2020
@IreneStr IreneStr added this to the 14.2 milestone May 15, 2020
@IreneStr
Copy link
Copy Markdown
Contributor

I've cherry-picked this to 14.2

@IreneStr IreneStr added the changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog label May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breadcrumbs structure issue 14.1 - Nested taxonomy breadcrumbs in wrong order (HTML & Schema)

3 participants