I am trying to upgrade my Drupal 8 from 8.8.0 to 8.8.4, I followed these instructions https://www.drupal.org/docs/8/update/update-core-via-composer. I couldnt find any anything on the following error at all doing a search.

I am getting the following error when running drush updb

[error]   (Currently using Missing or invalid modules Array)

In UpdateDBCommands.php line 55:

  Cancelled.


updatedb [--cache-clear [CACHE-CLEAR]] [--entity-updates] [--post-updates [POST-UPDATES]] [--                                             no-cache-clear] [--no-post-updates] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--vers                                             ion] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host                                              REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pip                                             e] [-D|--define DEFINE] [--xh-link XH-LINK] [--notify [NOTIFY]] [--druplicon] [--] <command>

PHP Fatal error:  Uncaught Drupal\Core\Entity\Query\QueryException: 'is_default' not found in                                              /mysite/core/lib/Drupa l/Core/Entity/Query/Sql/Tables.php:367
Stack trace:
#0 /mysite/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php(261): Drupal\Core\Entity\Query\Sql\Tables->ensureEntityT                                             able('', 'is_default', 'LEFT', NULL, 'base_table', 'store_id', Array)
#1 /mysite/core/lib/Drupal/Core/Entity/Query/Sql/Query.php(291): Drupal\Core\Entity\Query\Sql\Tables->addField('is_d                                             efault', 'LEFT', NULL)
#2 /mysite/core/lib/Drupal/Core/Entity/Query/Sql/Query.php(192): Drupal\Core\Entity\Query\Sql\Query->getSqlField('is                                             _default', NULL)
#3 /mysite/core/lib/Drupal/Core/Entity/Query/Sql/Query.php(81): Dr in /mysite/lib/Drupal/Core/Entity/Query/Sql/Tables.php on line 367


When I ran drush --debug I got the following.

[preflight] Redispatch to site-local Drush: /mysite/vendor/drush/drush/drush.
 [preflight] Config paths: /mysite/vendor/drush/drush/drush.yml
 [preflight] Alias paths: /mysite/drush/sites,/mysite/drush/sites
 [preflight] Commandfile search paths: /mysite/vendor/drush/drush/src
 [debug] Starting bootstrap to max [0.1 sec, 9.09 MB]
 [debug] Trying to bootstrap as far as we can [0.1 sec, 9.09 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalRoot() [0.1 sec, 9.09 MB]
 [debug] Change working directory to /mysite/ [0.1 sec, 9.09 MB]
 [debug] Initialized Drupal 8.8.5 root directory at /mysite/ [0.11 sec, 9.22 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalSite() [0.11 sec, 9.57 MB]
 [debug] Initialized Drupal site default at sites/default [0.11 sec, 9.74 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalConfiguration() [0.11 sec, 9.74 MB]
 [debug] Add service modifier [0.12 sec, 9.99 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalDatabase() [0.12 sec, 10.35 MB]
 [debug] Successfully connected to the Drupal database. [0.12 sec, 10.35 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalFull() [0.12 sec, 10.35 MB]
 [debug] Start bootstrap of the Drupal Kernel. [0.12 sec, 10.35 MB]
 [info] advancedqueue should have an extra.drush.services section in its composer.json. See http://docs.drush.org/en/master/commands/#specifying-the-services-file. [0.28 sec, 13.4 MB]
 [debug] devel commands loaded even though its constraint (^9) is incompatible with Drush 10.2.2. Broaden the constraint in modules/contrib/devel/composer.json (see 'extra\drush\services' section) to remove this message. [0.28 sec, 13.5 MB]
 [info] devel_entity_updates should have an extra.drush.services section in its composer.json. See http://docs.drush.org/en/master/commands/#specifying-the-services-file. [0.28 sec, 13.5MB]
 [debug] scheduler commands loaded even though its constraint (^9) is incompatible with Drush 10.2.2. Broaden the constraint in modules/contrib/scheduler/composer.json (see 'extra\drush\services' section) to remove this message. [0.28 sec, 13.5 MB]
 [debug] simple_sitemap commands loaded even though its constraint (^9) is incompatible with Drush 10.2.2. Broaden the constraint in modules/contrib/simple_sitemap/composer.json (see 'extra\drush\services' section) to remove this message. [0.28 sec, 13.5 MB]
 [debug] Found drush.services.yml for token Drush commands [0.28 sec, 13.5 MB]
 [info] pathauto should have an extra.drush.services section in its composer.json. See http://docs.drush.org/en/master/commands/#specifying-the-services-file. [0.28 sec, 13.5 MB]
 [debug] Get container builder [0.29 sec, 13.51 MB]
 [debug] Service modifier alter. [0.29 sec, 13.61 MB]
 [debug] process drush.console.services console.command [0.46 sec, 19.28 MB]
 [debug] process drush.command.services drush.command [0.46 sec, 19.28 MB]
 [debug] Found tagged service config.commands [0.46 sec, 19.28 MB]
 [debug] Found tagged service config.export.commands [0.46 sec, 19.28 MB]
 [debug] Found tagged service config.import.commands [0.46 sec, 19.28 MB]
 [debug] Found tagged service batch.commands [0.46 sec, 19.28 MB]
 [debug] Found tagged service cli.commands [0.46 sec, 19.28 MB]
 [debug] Found tagged service drupal.commands [0.46 sec, 19.28 MB]
 [debug] Found tagged service entity.commands [0.46 sec, 19.28 MB]
 [debug] Found tagged service image.commands [0.46 sec, 19.28 MB]
 [debug] Found tagged service jsonapi.commands [0.46 sec, 19.28 MB]
 [debug] Found tagged service language.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service locale.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service messenger.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service queue.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service role.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service state.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service twig.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service user.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service views.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service watchdog.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service pm.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service theme.commands [0.46 sec, 19.29 MB]
 [debug] Found tagged service sanitize.commands [0.46 sec, 19.3 MB]
 [debug] Found tagged service sanitize.comments.commands [0.46 sec, 19.3 MB]
 [debug] Found tagged service sanitize.sessions.commands [0.46 sec, 19.3 MB]
 [debug] Found tagged service sanitize.userfields.commands [0.46 sec, 19.3 MB]
 [debug] Found tagged service sanitize.usertable.commands [0.46 sec, 19.3 MB]
 [debug] Found tagged service advancedqueue.commands [0.46 sec, 19.3 MB]
 [debug] Found tagged service devel.command [0.46 sec, 19.3 MB]
 [debug] Found tagged service devel_entity_updates.command [0.46 sec, 19.3 MB]
 [debug] Found tagged service scheduler.commands [0.46 sec, 19.3 MB]
 [debug] Found tagged service simple_sitemap.commands [0.46 sec, 19.3 MB]
 [debug] Found tagged service pathauto.commands [0.46 sec, 19.3 MB]
 [debug] process drush.command_info_alterer.services drush.command_info_alterer [0.46 sec, 19.3 MB]
 [debug] process drush.generator.services drush.generator [0.46 sec, 19.3 MB]
 [debug] Finished bootstrap of the Drupal Kernel. [0.96 sec, 33.78 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\config\ConfigCommands [1.36 sec, 51.76 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\config\ConfigExportCommands [1.37 sec, 51.79 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\config\ConfigImportCommands [1.37 sec, 51.8 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\BatchCommands [1.37 sec, 51.8 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\CliCommands [1.37 sec, 51.8 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\DrupalCommands [1.37 sec, 51.81 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\EntityCommands [1.37 sec, 51.82 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\ImageCommands [1.37 sec, 51.83 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\JsonapiCommands [1.37 sec, 51.84 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\LanguageCommands [1.37 sec, 51.85 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\LocaleCommands [1.37 sec, 51.86 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\MessengerCommands [1.37 sec, 51.87 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\QueueCommands [1.37 sec, 51.87 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\RoleCommands [1.37 sec, 51.88 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\StateCommands [1.38 sec, 51.9 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\TwigCommands [1.38 sec, 51.92 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\UserCommands [1.38 sec, 51.93 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\ViewsCommands [1.38 sec, 51.97 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\core\WatchdogCommands [1.39 sec, 52 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\pm\PmCommands [1.39 sec, 52.03 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\pm\ThemeCommands [1.39 sec, 52.04 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeCommands [1.39 sec, 52.05 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeCommentsCommands [1.39 sec, 52.05 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeSessionsCommands [1.39 sec, 52.05 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeUserFieldsCommands [1.39 sec, 52.05 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeUserTableCommands [1.39 sec, 52.06 MB]
 [debug] Add a commandfile class: Drupal\advancedqueue\Commands\AdvancedQueueCommands [1.39 sec, 52.06 MB]
 [debug] Add a commandfile class: Drupal\token\Commands\TokenCommands [1.39 sec, 52.07 MB]
 [debug] Add a commandfile class: Drupal\devel_entity_updates\Commands\DevelEntityUpdatesCommands [1.39 sec, 52.07 MB]
 [debug] Add a commandfile class: Drupal\scheduler\Commands\SchedulerCommands [1.39 sec, 52.08 MB]
 [debug] Add a commandfile class: Drupal\simple_sitemap\Commands\SimplesitemapCommands [1.39 sec, 52.08 MB]
 [debug] Add a commandfile class: Drupal\pathauto\Commands\PathautoCommands [1.39 sec, 52.09 MB]
Drush Commandline Tool 10.2.2

CommentFileSizeAuthor
#17 admin - status report.png18.34 KBscott_euser

Comments

Dru Pal created an issue. See original summary.

hstoellinger’s picture

Hello,
I see the same error, trying to upgrade von 8.8.4 to 8.8.5!
Regards from Salzburg
H. Stoellinger

hstoellinger’s picture

Hello,
duplicate of #2!
H. Stoellinger

vincetingey’s picture

Just getting into Drupal 8 and have set up a very minimal site with only a custom theme, Drush, and the LDAP modules installed so far. I am also getting this error when trying to run the following Drush command:

drush updatedb --no-interaction --yes

cilefen’s picture

Does this occur while using update.php? If it does not—meaning update.php is working— then it's a Drush issue.

vincetingey’s picture

Figured it out, it was due to a Composer error during update of core and modules. It caused the removal of my ldap modules. If you take any actions in the Drupal UI it will remove the write ability for the owner on the sites/default folder. This will stop the Composer Drupal scaffold plugin from being able to write to the sites/default/default.services.yml file.

https://www.drupal.org/docs/develop/using-composer/using-drupals-compose...
https://www.drupal.org/docs/8/update/troubleshooting-database-updates

FIX:

  1. Ensure the proper write permissions for the user running the Composer and Drush commands on the sites/default folder. chmod u+w sites/default
  2. Run the Composer update command. composer update 'drupal/*' --with-dependencies
  3. Run the Drush update db command. drush updatedb --no-interaction --yes
dru pal’s picture

Thanks for all the fast and great feedback. I was able to resolve the issue and I think I know what the culprit is. To summarize the issue is a bug in Drush 10.1+. It's not working well with Drupal 8.8.4+ (although that might not matter and just be a drush issue). I did a fresh install (thunder distribution) on both drush 10.1 and drush 9.7.2. I got things to work on Drush 9.7.2 but drush 10.1 I could not resolve.

Here are some notes

  1. Just make sure to make a copy of your database (clear cache) AND all your files and folders.
  2. Run an install composer command like composer create-project thunder/thunder-project yourprojectfolder --no-interaction --no-install
  3. Change the drush version in the composer.json. I used "drush/drush": "^9.6" (which reverted to 9.7.2)
  4. Run the install (composer install or test dry run first). FYI: I found no difference in output running Composer install vs composer update (even with dependencies) during a dry run
  5. Try to open the site in a browser just to check if the install of Drupal even starts (dont run it though)
  6. If you have an existing database like I did, copy the settings for the database or the settings.php file to the new site
  7. See what happens with drush (drush status, drush sql-connect, drush updb etc)
  8. if you still get errors, see what you get by running update,php in browser. You may get a page saying missing modules, themes, folders etc.
  9. If you get white screen of death from drupal read your apache error logs
  10. Installing all missing modules and folders helps in this case (dont forget ../confing/sync). Do the modules installs with composer require
  11. run update.php again and see what happens.
  12. see if drush commands are working
  13. update the database with update.php
  14. try drush commands again if they did not work before
  15. clear cache
bajah1701’s picture

I'm actually seeing this error on my dev environment using drush 9.7.2. This did not occur on my local environment using the same version of drush. The php versions are different though. dev 7.2.10 local 7.2.24

dru pal’s picture

@bajah1701 Did you run update,php?

bajah1701’s picture

I got it fixed by checking drush watchdog:show to determine which module was missing. Reinstate that module and it went well from there.

therobyouknow’s picture

following because I came here when searching for a solution to: "[error] (Currently using Incompatible module Array) "

therobyouknow’s picture

$ ddev drush updb
 [error]   (Currently using Incompatible module Array) 

 Requirements check reports errors. Do you wish to continue? (yes/no) [yes]:
 > yes

 [success] No pending updates.
$ 

saw this when i attempted to drush pm-uninstall a module then remove it from composer. (bg_img_field).

therobyouknow’s picture

What solved this issue for me is to change from php version 7.2 to 7.4

Now after doing that, running drush updb doesn't give the error.

I couldn't trace the common part of the error message "(Currently using Incompatible module".

But I did trace "Requirements check reports errors. Do you wish to continue?" to
vendor/drush/drush/src/Commands/core/UpdateDBCommands.php (i.e. the drush code - I am using "drush/drush": "^10.2" - in composer.json.

On finding that error there, that suggested to me that the issue might be with drush version, So, knowing that I wanted to update the db, I then went on to try /update.php in the browser (when logged in as admin to my site)

I got an error from Drupal in the browser, but what I got was really useful, as I was able to use it to solve my issue:

Requirements problem
Errors found
INCOMPATIBLE MODULE
The following module is installed, but it is incompatible with PHP 7.2.27-5+0~20200202.35+debian10~1.gbp2925f8:
Background Image
Review the suggestions for resolving this incompatibility to repair your installation, and then re-run update.php.

update.php error message about php version incompatibility

So I changed my version of php to 7.4 (I'm running all this locally with ddev so edited the .ddev/config.yaml to use 7.4, issued ddev poweroff command, then started the local site up again with ddev start)

Then I ran ddev drush updb to update the database (this command was where I got the error above about Requirements, Array etc)

And now, drush ran successfully:

(I should say that watchdog/recent db logs didn't give me any clue, but the update.php error was very helpful)

$ ddev drush updb
------------------ ----------- --------------- ----------------------------------------------------
Module Update ID Type Description
------------------ ----------- --------------- ----------------------------------------------------
background_image 8401 hook_update_n Ensure all entity targets are stored using UUIDs.
------------------ ----------- --------------- ----------------------------------------------------

Do you wish to run the specified pending updates? (yes/no) [yes]:
> yes

> [notice] Update started: background_image_update_8401
> [notice] Update completed: background_image_update_8401
[success] Finished performing updates.
$

therobyouknow’s picture

I would note that the author of the module where I needed a later than 7.2 version of php, has said that their module can work with 7.3 as well as 7.4.

tjtj’s picture

I get this too. But if I run updates using the GUI, it says:
In order to run update.php you need to either have "Administer software updates" permission or have set $settings['update_free_access'] in your settings.php.
I am admin, and tried it is a second admin account. Where is the modules array located?
'drush ws' has no errors

scott_euser’s picture

StatusFileSize
new18.34 KB

This updated revealed a longer standing issue for me in a dev site. If I ignored the above warning and went to /admin/reports/status and saw 'Missing or invalid theme'. I created a folder with that themename, and the corresponding themename.info.yml, and uninstalled the theme properly and the problem went away.
Screenshot of admin status report showing missing or invalid theme error

So essentially something was done poorly earlier in my dev site and this update only surfaced the issue to the forefront but the update itself did not cause the issue. Hopefully this helps someone else who comes across the same issue.

wturrell’s picture

Similar issue to scott_euser (#17) when upgrading a site from 8.7.13 to 8.8.5 just now, but with themes rather than modules.

The message is on the status report is:

The following themes are marked as installed in the core.extension configuration, but they are missing

You also see this (skippable) warning when running drush updb:

Currently using Missing or invalid themes Array

I think what simply happened was in the early days of the site I decided to rename a couple of custom themes, but the old ones had entries left in core.extension. As soon as I removed them - you can do this via the web if you have the devel module installed, at /devel/config/edit/core.extension, or drush - the warning went away.

To answer tjtj (in #16) - the module array is also in core.extension - it's simple to edit but backup the database or test on a development version of your site first.

Version: 8.8.4 » 8.8.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pieterdc’s picture

Browsing to update.php does indeed reveal the error details, while 'drush updb' doesn't.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
cilefen’s picture

Status: Active » Closed (outdated)

I am closing this support request because there have been no recent comments.