I just updated a site to the current Backdrop version 1.23.0, but when I run <site>/core/update.php, i get a blank white page, with a page title of "Requirements problem". The page html is not fully formed. I have never had that issue before when updating that site. The site still appears to run fine, although when I go to a site page immediately after trying update.php, i see a warning and several notices (held over from the previous request to update.php) all coming from a file in my module. Not sure why that is even executing. 

Any thoughts? Is there a way to verify the database structure to ensure that the database is up to date?

Thanks for any help with this.

Accepted answer

ok, i found the problem, though i don't understand it. when serving up  .../core/update.php, backdrop was utilizing the file maintenance-page.tpl.php in the templates directory of the custom theme used by the site. being a custom template, it was utilizing code from the custom module, which was out of context and failing for that administrative function. i simply moved that file out of the theme directory, went back to core/update.php, and - although the layout was a bit off - the correct database update content was displayed. the database update then completed with no problems.

i don't know why this happened now but not during previous updates. but i am happy to have figured it out and gotten it done.

thanks to those who offered help and suggestions.

 

Comments

Can you post the warning and notices?

actually i got rid of those warnings/notices by adding some better error checking in that code. but thanks!

Additionally, can you post PHP version? To check if an additional update is needed, go to Reports > Status report

To troubleshoot, it would be helpful to know what modules you have installed as well. You can create a View of installed modules and copy-paste that list 

it is running php 7.4.25. and i have updated core and all modules that had updates. the available updates report shows everything up to date, but the status report shows the database is out of date.

after tracing through some code (adding debug statements, then removing them), and disabling and then re-enabling my custom module, i am now seeing a different result. i am now not getting a blank page or an error per se, but i am getting the database update page rendered incorrectly, and without the form to execute the updates.  

this site uses a custom theme, and it is configured to use the seven theme for administration. it also uses a rather large custom module, which also contains some template files for rendering stuff.

when i disable the custom module, the database update page barfs on a fatal error due to a missing function - which is defined in the module and called from a template file in the module. seems bizarre to me.

all the admin pages look fine. but the database update page looks like it is using some of the custom template files. let me demonstrate with screenshots.

below is a normal page on the site, using the custom theme and module.

 

below is the database update page (most of it, the footer stuff is out of view at the bottom rendered similarly):

so it seems to be using the custom templates, but incompletely, and without including the actual content of the page - the database update form. and although i see the custom css file being imported in the html source, clearly it is not being applied.

i have previously done several updates to the site, with no such problems, though it has been probably almost a year now since the last one.

finally, below are the contributed modules being used (with the custom module being in addition).

any ideas greatly appreciated!

This may be a tough one to debug. A few observations. Entity Reference is now in core, so I would remove that module from the modules folder.

I would also disable and uninstall some less essential modules. ESPECIALLY, those that implement hook_requirements(): mailsystem, SEO metatags, SMPT Authentication. It seems like there is a requirements problem, and those are usually produced by implementations of hook_requirements.  

One thing you may want to do is to also manually truncate all tables that start with "cache" from the database after disabling your custom module. The problem sometimes is that clearing cache apparently doesn't clear all cache tables. (Be sure to backup before).

i appreciate the ideas! i will try some of that. i can't get rid of mailsystem or SMTP Auth. also (see comment above https://forum.backdropcms.org/forum/error-updatephp?page=0%2C0#comment-4531) i am no longer getting the requirements error, it seems the db update page is for some reason loading parts of my module that cause a fatal error when i disable the module. 

i think i will also try adding a check in the _preprocess_page() and _preprocess_layout() hooks in my module for that db update page url, and bail if that is the request. i doubt that will make a difference, but worth a shot.

thanks again!

I edited my response a bit to get rid of some typos and clarify thing

ok, i found the problem, though i don't understand it. when serving up  .../core/update.php, backdrop was utilizing the file maintenance-page.tpl.php in the templates directory of the custom theme used by the site. being a custom template, it was utilizing code from the custom module, which was out of context and failing for that administrative function. i simply moved that file out of the theme directory, went back to core/update.php, and - although the layout was a bit off - the correct database update content was displayed. the database update then completed with no problems.

i don't know why this happened now but not during previous updates. but i am happy to have figured it out and gotten it done.

thanks to those who offered help and suggestions.