Skip to content

NavigationLink: make the URL dynamic for links to Posts #18345

@retrofox

Description

@retrofox

The link URL should be generated dynamically, instead of storing the URL as an attribute.

Edit for clarity. To reproduce:

  1. Create a page, name it something
  2. Create a post
  3. In the post insert a navigation block
  4. In the block insert a link to the page you created
  5. Save and publish
  6. Check that your link links to the right page
  7. Go to the pages list in WP Admin
  8. Find your page and click the quick edit link that appears when you hover it
  9. Copy the slug
  10. Change the slug to lorem-ipsum
  11. Save
  12. Go to the page with the menu on the front end, refresh the page
  13. Hover the link: the URL should be the old one, not lorem-ipsum
  14. Clicking it should still take you to the correct page because WP handles redirects
  15. Create a new page and publish it
  16. Go to the pages list in WP Admin
  17. Find your new page and click the quick edit that appears when you hover it
  18. Replace the slug by pasting the one you copied earlier
  19. Save
  20. Go to the page with the menu on the front end, refresh the page
  21. Hover the link: the URL should be the old one, not lorem-ipsum
  22. Clicking it should take you to the wrong page because WP does not handle the redirect now

Metadata

Metadata

Labels

[Block] NavigationAffects the Navigation Block[Status] In ProgressTracking issues with work in progress[Type] TaskIssues or PRs that have been broken down into an individual action to take

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions