Skip to content

Upgrade/Install: Remove the translation_updates query arg after the notice shows - #16064

Open
mukeshpanchal27 wants to merge 2 commits into
WordPress:trunkfrom
mukeshpanchal27:fix/removable-translation-updates-arg
Open

mukeshpanchal27 wants to merge 2 commits into
WordPress:trunkfrom
mukeshpanchal27:fix/removable-translation-updates-arg

Conversation

@mukeshpanchal27

Copy link
Copy Markdown
Member

On the Updates screen, untick every translation update and submit. update-core.php redirects to update-core.php?translation_updates=deferred and shows the "deferred" notice.

translation_updates is not listed in wp_removable_query_args(), so the arg stays in the URL. The notice then shows again every time the page reloads. Other notice args, such as admin_email_updated and network_admin_email_updated, are already on that list.

This PR adds translation_updates to the list and extends the existing test.

Testing instructions

  1. Have at least one translation update available.
  2. Go to Dashboard > Updates, untick every translation update, and submit.
  3. Without this PR, the URL keeps ?translation_updates=deferred, and the notice shows again after a reload.
  4. With this PR, the arg is removed from the URL, and the notice does not come back after a reload.

Tests_Functions_WpRemovableQueryArgs passes.

Trac ticket: https://core.trac.wordpress.org/ticket/42281

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Finding the bug while reviewing 7.2 changes, drafting the fix and test. I reviewed the final change.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

🤖 Generated with Claude Code

… notice shows.

When no translation update is selected, `update-core.php` redirects with `translation_updates=deferred` to show a notice. The arg was not listed in `wp_removable_query_args()`, so it stayed in the URL and the notice showed again on every reload.

Follow-up to [99b0144].

See #42281.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props mukesh27.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@mukeshpanchal27 mukeshpanchal27 self-assigned this Nov 17, 2026
@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the change to prevent the deferred-translation notice from reappearing on reload.

No open issues 🎉

What changed in this PR

This PR uses WordPress’s existing admin URL cleanup to remove translation_updates after the deferred-translation notice is displayed, preventing the notice from reappearing on reload.

Changes:

  • Adds translation_updates to the shared removable query-argument list.
  • Extends the existing unit test to assert membership and reference Trac ticket #42281.
File Description
tests/​phpunit/​tests/​functions/​wpRemovableQueryArgs.php Adds a regression assertion and ticket annotation.
src/​wp-includes/​functions.php Marks translation_updates for URL cleanup.

Review effort: Balanced

@lancewillett lancewillett left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The notice still appears on the first request. I checked the Updates URL on single-site and network admin: without the patch the canonical URL retained translation_updates=deferred; with the patch it removed that argument and preserved an unrelated one. The new assertion in the existing PHPUnit test failed when I removed the new list entry. Jyria also verified the full single-site browser flow, including reload and a second submission, in Trac comment 40.

AI review · gpt-6

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.

3 participants