Skip to content

Add links to the existing duplicate notices#501

Open
johnbillion wants to merge 2 commits into
Yoast:trunkfrom
johnbillion:admin-notice-links
Open

Add links to the existing duplicate notices#501
johnbillion wants to merge 2 commits into
Yoast:trunkfrom
johnbillion:admin-notice-links

Conversation

@johnbillion
Copy link
Copy Markdown

Context

Every time I edit a post or page which has an in-progress duplicate, I'm frustrated that the editing screen doesn't show a link to the editing screen for the duplicate.

This message is informative but not actionable.

On a site with a large number of posts or pages, it can be laborious to find that post on the post listing screen in order to get the link to the in-progress duplicate. Each message about an existing duplicate should include a relevant link.

This PR adds a useful link to the editing screen, or the trash listing screen if the duplicate is in the trash:

Summary

This PR can be summarized in the following changelog entry:

  • Added useful links to admin notices that refer to existing duplicates.

Relevant technical choices:

I have intentionally appended the links to the existing admin notice messages in order to avoid invalidating existing translations. They might perhaps read better with inline links, but that would require inserting the link HTML into localisable strings which I'm not a big fan of doing.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Click "Rewrite & Republish" on an existing post, and start work on making changes.
  • Visit the original post at its permalink on the front end of the site.
  • Click the "Edit" button the admin toolbar.
  • Confirm that the admin notice now shows a useful link to edit the existing duplicate.

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

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. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

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

Innovation

  • No innovation project is applicable for this PR.

@johnbillion johnbillion marked this pull request as ready for review May 20, 2026 22:18
@coveralls
Copy link
Copy Markdown

coveralls commented May 21, 2026

Coverage Report for CI Build 26217146758

Warning

No base build found for commit 8100116 on trunk.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 60.207%

Details

  • Patch coverage: 25 of 25 lines across 1 file are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 2709
Covered Lines: 1631
Line Coverage: 60.21%
Coverage Strength: 7.32 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants