Repository navigation
Upgrade/Install: Keep the translation update selection after asking for credentials - #15909
Open
aryanjasala wants to merge 1 commit into
Open
aryanjasala wants to merge 1 commit into
aryanjasala wants to merge 1 commit into
Conversation
…or credentials. When WordPress needs FTP or SSH credentials to update translations, the credentials form posts back to `update-core.php?action=do-translation-upgrade` without the fields of the Updates screen form. Since [65226], a request without those fields selects nothing, so the Updates screen reloads and no translation is installed. The upgrader URL now carries the selected updates, as it does for plugins and themes. A plugin translation update is also named after the plugin that has its slug in the plugin update data, instead of a plugin whose main file has the same name. Follow-up to [65226]. See #66663.
|
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: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When WordPress needs FTP or SSH credentials, the "Connection Information" form posts back to
update-core.php?action=do-translation-upgradewithouttranslations[]andchecked[]. Since [65226],wp_process_translation_update_selection()returnsfalsefor that request and the Updates screen reloads, so the selected translations are never installed.This change:
&translations=<id>,<id>), the same way plugin and theme updates do. The request after the credentials form reads them from there. Deferrals made by the first request are kept.wp_get_translation_update_plugin_names()from the least to the most reliable key: main file names, then plugin files and directories, then slugs from the plugin update data. Before, a plugin whose main file was named after another plugin's slug showed that plugin's name (bar/bar.phpandzeta/bar.php, the update forbarwas named "Zeta").Tests: three new tests in
includesUpdate.php(--group 66663) cover both plugin name orders and a second selection request after the credentials form. The two plugin name tests fail on trunk. The file (28 tests) passes on single site and multisite, and PHPCS reports no errors.update-core.phphas no unit tests, so the credentials flow was tested end to end on 7.2-beta5-65392 withdefine( 'FS_METHOD', 'ftpext' );: on trunk the credentials form returns a 302 to the Updates screen and nothing runs, with this change the upgrader runs for the selected translation.Trac ticket: https://core.trac.wordpress.org/ticket/66663
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Writing the patch and tests. I reproduced the bug end to end, reviewed the patch and checked the test results.
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.