-
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
Fixed: Database update fails when Backdrop is set to another language than English and the string "Apply pending updates" has a translation #5168
Comments
I was not able to reproduce this @djzwerg. Here's what I've tried:
|
I got this issue a few times on different setups but not every time a core updated was installed. I will try to reproduce it on a clean Backdrop site these days... |
I have another scenario for a similar error:
|
Thanks @djzwerg ...if you can spot a common factor in your setups that might be causing this, then that would help. We can't fix things that we can't reproduce :) @findlabnet what you are describing seems to be a known issue with Drupal as well: https://www.drupal.org/project/drupal/issues/2616164 (I found it during my research for the issue that @djzwerg reported here). I suspect that that might be a different problem than the one @djzwerg has reported here, so can you please create a separate issue for it? Thanks. |
@findlabnet that's not the same issue. If you try using yourdomain.name/update.php it should work. |
I also can't reproduce it (yet). @djzwerg are the sites native Backdrop installs, or did you upgrade from D7? Which modules are installed? |
@indigoxela these are native Backdrop installs. On the sites are different modules and themes installed. |
I guess, we need to figure out, what these sites share. Are the modules completely different, or is there some overlap? Are the sites on different hosting, or do problems appear on the same hosting? The first thing that always comes to my mind when it's about WSOD: PHP memory limit (memory_limit). Which limits are reported on /admin/reports/status on affected sites? |
Today I was able to reproduce the issue: I installed a site from @djzwerg on my shared hosting and got a white screen when I tried to run database updates. The issue persisted after disabling all contrib modules and contrib themes. I was only able to run the database updates after enabling English and setting it as default language. No errors in DBlog, btw. |
Same here. I could drill the problem down to the relatively large locales_source and locales_target database tables (both ~4MB). Two ways worked to complete the pending updates:
But... as new modules get added to sites, the tables will grow again and at some point updating will fail again. It's not completely clear to me if it's really a WSOD - no 5xx in the logs. But there is a problem other people could run into as well. The more modules and the more time has passed (updated strings and translations), the bigger the tables get. Other things I tried that did not help: larger memory_limit and other values in php.ini. |
Is this the same as issue #5092? In that case one link would work but the other would fail. |
No, definitely not the same. In the other issue the link points to 404, in this issue the link is OK, but the database update ends up with an empty (white) page and the update won't run at all, if the translation tables are too big. |
FTR: this issue needs more recherche. It's not clear to me, why the batch job for database (and config) updates gets stuck in a white page (note: not a 5xx) in step "Run updates". According to the apache logs nothing happens after the (successful) POST. Note: the updates themselves are harmless, they complete in less than a second if either run:
|
And another remark: the size of tables locales_source and locales_target from the demo web are big, but I have D7 sites that have a lot more records in both tables and I never experienced any problems with that. It seems to be specific to Backdrop. |
UPDATE forget my previous assumptions, the actual problem is a translation for "Apply pending updates".
In update.php the form submit button has a translated value: https://github.com/backdrop/backdrop/blob/1.x/core/update.php#L162 But later on the check is against the untranslated string: Which means that the requested operation and proper batch id can not be determined. The batch has not started yet, so I'm not sure how to solve that. For sure the update is by design a little simpler (using $_REQUEST instead of $form_state['triggering_element']...), because at that point some parts of Backdrop may not be fully available.
I'll update the STR. |
Yes, that should be done. If the string is initially translated and then used elsewhere for any purpose like comparing against values, it should use the translated string. |
Many thanks for your hint - nice, this makes it a one-liner fix. |
Thanks @indigoxela for all the troubleshooting, research, and for figuring out what the culprit is and filing a PR 👍🏼 ❤️ @djzwerg can you please apply the change from https://github.com/backdrop/backdrop/pull/3701/files (wrap the string in |
Patch applied - I can confirm that this solves this issue. Thanks a lot for your time and work! |
Assuming that @djzwerg has no permission here to set labels, I'm updating to "works for me". |
Thanks @djzwerg for filing the issue and testing the fix. Thanks @indigoxela and @oadaeh for the fix! And thanks for testing/reviewing @klonos and @olafgrabienski. I've merged backdrop/backdrop#3701 into 1.x and 1.19.x. @djzwerg I've also invited you to the "Documentation and Organization" team which will give you access to set labels. |
Steps To Reproduce
You'll end up with a white (empty) page in step "Run updates", but that's no WSOD - just a page with zero content.
Original report:
Description of the bug
When you're using Backdrop CMS with another language than Englisch and you're trying to update the database (core tables) you'll get a white screen. The log files are empty.
Steps To Reproduce
To reproduce the behavior:
Actual behavior
You'll get a white screen. Enable English language and try again update.php works.
Add any other information that could help, such as:
The text was updated successfully, but these errors were encountered: