I get this error after clicking "Install Update", and the files have been downloaded:

Error: Call to undefined method DatabaseConnection_mysql::utf8mb4IsConfigurable() in _system_check_db_utf8mb4_requirements() (line 549 of /app/modules/system/system.install).

If I refresh the page with F5, it continues to the "Drupal database update" page, and I can complete the update from Drupal 7.40 to 7.64 by clicking "Continue".

My process with Lando:

wget https://ftp-origin.drupal.org/files/projects/drupal-7.40.tar.gz
tar -xvzf drupal-7.40.tar.gz && rm drupal-7.40.tar.gz
cd drupal-7.40
lando init --recipe drupal7 --webroot . --name updates
lando start
drush site-install --db-url=mysql://drupal7:drupal7@database/drupal7 --account-pass=content -y

# get core_update module and log in to web site
drush dl core_update && drush en core_update -y
drush uli -l http://updates.lndo.site
CommentFileSizeAuthor
#8 db-error-undefined-method.png33.25 KBressa
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ressa created an issue. See original summary.

ressa’s picture

Title: Database error » Database error, but update succeeds
ressa’s picture

Project: Web Install Kit »
ressa’s picture

Project: » Core Update
Version: » 7.x-1.0-beta2
mbaynton’s picture

So to clarify, are you saying that you're on a page with a progress bar that says it's downloaded the latest version, and then you immediately get an error message originating from the file /app/modules/system/system.install, before you've been redirected to the database update script (/update.php)?

That seems hard for me to reconcile with the flow of control: system.install is a part of Drupal core that is of course only run during installation and database schema updates, and no part of Drupal core is invoked between the download of the latest version and the redirect to /update.php.

mbaynton’s picture

Status: Active » Postponed (maintainer needs more info)
mbaynton’s picture

I ask because if your report is correct, then I definitely need to look into that, but if you've actually been redirected to /update.php or if the error appeared in logs that were created during the site install, then it's a Drupal thing that I can't do anything about. Did it just white-screen-of-death upon the 1st click of the update button, and you pulled the message from a logfile?

ressa’s picture

It happens right after the progress bar, but on the /update.php page and with the styling of the update theme. It was printed to the screen, as you can see in this image:

error undefined method

Also, I can't see any errors in the Drupal log.

ressa’s picture

Issue summary: View changes
mbaynton’s picture

Status: Postponed (maintainer needs more info) » Active

Gotcha. This looks to be a problem with core files being inconsistent with each other, at least as the interpreter sees them. Especially given that waiting a few seconds and hitting f5 fixes it makes me strongly suspect there's some sort of filesystem (your setup involves nfs as I recall?) or opcocde caching that's responsible and the core_update module actually did its job correctly, but if I'm wrong that'd be a really bad issue and plus if it happens for you it'll happen for others, so I'll see if I can replicate and mitigate it.

mbaynton’s picture

If you still have this install on disk, can you try running this, from the same working directory as the wget at the start of the commands in the issue summary, and toss the output in here? This'll verify the integrity of the files in your drupal-7.40 directory.

mkdir drupal-7.64-check && cd drupal-7.64-check
curl https://ftp.drupal.org/files/projects/drupal-7.64.tar.gz | tar --strip-components=1 -zx
cd ..
diff --brief -r drupal-7.40 drupal-7.64-check

The only differences should be like settings.php, all the actual code files should jive.

ressa’s picture

I use Ubuntu 18.04, but have switched from Virtualbox + Vagrant to the Docker-based Lando, which I think is one of the most popular platforms for Drupal development. Understandably, it's much easier and faster to use than Virtualbox. Here is a great article on how to get started: https://colorfield.be/blog/drupal-and-docker-the-easy-way-with-lando

Here is a diff between the two directories:

$ diff --brief -r drupal-7.40 drupal-7.64-check
Only in drupal-7.40: .lando.yml
Only in drupal-7.40/sites/all/modules: core_update
Only in drupal-7.40/sites/default: files
Only in drupal-7.40/sites/default: settings.php
mbaynton’s picture

Thanks so much for providing the diff! Looks fine to me so that really helps bisect the problem.

One other question, are you able to reproduce this? I'll play around with the opcache php.ini settings and see if I can create this or similar issues that way, but if it happens consistently for you I'll send patches your way as well.

ressa’s picture

You're welcome! I am glad that it helps a little.

The error has occurred every time I have done the process (4 or 5 times) so it seems to be pretty consistent. I have just run through it once again, with the same result. Have you tried Lando? I ask because so many people use it now, that it might be worth for you to kick the tires of Core update with Lando yourself. I wouldn't be surprised if it ends up first in The 2019 Drupal Local Development Survey.

But feel free to send patches my way, I will test them as soon as I can.

  • mbaynton committed ef39672 on 7.x-1.x
    Issue #3038337 by ressa, mbaynton: Database error, but update succeeds
    
mbaynton’s picture

Status: Active » Postponed (maintainer needs more info)

I haven't used Lando, but I have been able to reproduce the specific error with a slower opcache.revalidate_freq. I put in and tested the fix for that, worked for me. Would you be willing to clone the latest version from git and see if that fixes it for you too?

ressa’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

I just tried updating with the latest from git, and the update now goes through without any errors, thanks for fixing it!

mbaynton’s picture

Status: Reviewed & tested by the community » Fixed

Most excellent! Really appreciate your report and testing.

ressa’s picture

Issue summary: View changes

No problem, I am only glad I could help. Thank you for building Core Update!

mbaynton’s picture

Status: Fixed » Closed (fixed)