-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update.php: Do not add language prefix to "Skip backup" and "Cancel" link #6832
Comments
My suggestion would be to use a more low-level approach for creating links in update.php. There's no need for aliases, no need for sanitizing, ... But maybe I'm missing something. |
A PR is available for testing and review. I don't think, it's possible to do testing only in the sandbox, as there needs to be a trigger for an update. For local testing I'd recommend a custom module, where you uncomment the update hook after you installed it. foobar.info:
foobar.install: <?php
/**
* Trigger update.
*/
//function foobar_update_1000() {} ^^ after intalling this module, uncomment the update hook and visit admin/reports/status. |
Issue confirmed, nice catch! I've tested locally with the Foobar module (needs also a |
Also reproduced, also confirmed the patch makes sense, code LGTM |
Thank you @indigoxela, @olafgrabienski, and @argiepiano! I merged backdrop/backdrop#4999 into 1.x and 1.30.x. I have not checked, but |
The links in restore.php are OK. |
Description of the bug
This only affects multilingual sites, which have a language prefix set for the default language.
Steps To Reproduce
Actual behavior
You end up with a 404.
Expected behavior
Getting to the next step.
Additional information
This happens, because url() adds the language prefix to the link.
The function chain for the skip link is:
theme_link() -> l() -> url()
And the url() function considers the language, but our default page to update can't handle that.
The quick workaround is to copy the link and strip the language prefix manually, to get to the next step. Doesn't seem ideal. 😉
BTW: the same is true for the "Cancel" link on the next page ("Review updates") - 404.
The text was updated successfully, but these errors were encountered: