I've been trying to upgrade from 8.6.16 to 8.7.1... After issuing "composer update drupal/core --with-dependencies," everything minus the database seemed to get upgraded but I still had to apply the database updates. So after trying both "drush updatedb"and using the update.php approach, I keep running into a wall with applying the database updates.
Here's where everything stands right now:
- The Drupal 8 status page shows version 8.7.1 (on a PHP 7.1.9 server).
- Composer Version 1.8.5
- Drush Version 9.7.0-dev
- Also on the status page, I see the following (which I believe coincides with the pending database updates):
- Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Custom menu link
The Custom menu link entity type needs to be updated.
The Revision ID field needs to be installed.
The Revision create time field needs to be installed.
The Revision user field needs to be installed.
The Revision log message field needs to be installed.
The Default revision field needs to be installed.
The Revision translation affected field needs to be installed.
- The update.php UI shows the following pending updates:
- system module
= Initialize 'expand_all_items' values to system_menu_block.
= Change plugin IDs of delete actions.
= Clear the menu cache. @see https:www.drupal.orgprojectdrupalissues3044364
= Update all entity displays that contain extra fields.
= Clear the library cache and ensure aggregate files are regenerated.
= Force cache clear for language item callback. @see https:www.drupal.orgnode2851736
= Force cache clear to ensure aggregated JavaScript files are regenerated. @see
https:www.drupal.orgprojectdrupalissues2995570
- block_content module
= Adds a 'reusable' filter to all Custom Block views.
- contextual module
= Ensure new page loads use the updated JS and get the updated markup.
- image module
= Add 'anchor' setting to 'Scale and crop' effects.
- menu_link_content module
= Update custom menu links to be revisionable.
- node module
= Clear caches due to updated views data.
...but when I try to apply the database updates via clicking the "Apply pending updates" button using the update.php approach, I eventually see the following AJAX error:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /projects/sandbox_d8/update.php/start?id=24&op=do_nojs&op=do
StatusText: OK
ResponseText:
...and if I try to access Watchdog at that point, the only thing I get is a blank white page with the words "The website encountered an unexpected error. Please try again later" at the top.
So I then move on to trying to apply the updates with Drush. Over in a command prompt, I issue "drush updatedb". This results in showing me a list of available updates beginning with block_content and ending with a few from the system module (see attached "pending updates" file for the actual list).
I enter "yes" to apply all the updates.
After a few seconds, Drush chokes with the following notice / errors:
- [notice] Update started: block_content_post_update_add_views_resusable_filter
- [error] The "view" entity type does not exist.
- [error] Update failed: block_content_post_update_add_views_resusable_filter
In ProcessBase.php line 184: Unable to decode output into JSON.
Below is my composer.json contents:
{
"name": "drupal/drupal",
"description": "Drupal is an open source content management platform powering millions of websites and applications.",
"type": "project",
"license": "GPL-2.0-or-later",
"require": {
"composer/installers": "^1.0.24",
"wikimedia/composer-merge-plugin": "^1.4"
},
"replace": {
"drupal/core": "^8.7"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"preferred-install": "dist",
"autoloader-suffix": "Drupal8"
},
"extra": {
"_readme": [
"By default Drupal loads the autoloader from ./vendor/autoload.php.",
"To change the autoloader you can edit ./autoload.php.",
"This file specifies the packages.drupal.org repository.",
"You can read more about this composer repository at:",
"https://www.drupal.org/node/2718229"
],
"merge-plugin": {
"include": [
"core/composer.json"
],
"recurse": true,
"replace": false,
"merge-extra": false
},
"installer-paths": {
"core": ["type:drupal-core"],
"modules/contrib/{$name}": ["type:drupal-module"],
"profiles/contrib/{$name}": ["type:drupal-profile"],
"themes/contrib/{$name}": ["type:drupal-theme"],
"drush/contrib/{$name}": ["type:drupal-drush"],
"modules/custom/{$name}": ["type:drupal-custom-module"],
"themes/custom/{$name}": ["type:drupal-custom-theme"]
}
},
"autoload": {
"psr-4": {
"Drupal\\Core\\Composer\\": "core/lib/Drupal/Core/Composer"
}
},
"scripts": {
"pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump",
"post-autoload-dump": "Drupal\\Core\\Composer\\Composer::ensureHtaccess",
"post-package-install": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
"post-package-update": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
"drupal-phpunit-upgrade-check": "Drupal\\Core\\Composer\\Composer::upgradePHPUnit",
"drupal-phpunit-upgrade": "@composer update phpunit/phpunit phpspec/prophecy symfony/yaml --with-dependencies --no-progress",
"phpcs": "phpcs --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --",
"phpcbf": "phpcbf --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
]
}
I'm also seeing the following stack trace in my PHP error log after trying all this:
Error: Unsupported operand types in
Drupal\Core\Routing\RouteBuilder->rebuild() (line 163 of C:\www\projects\sandbox_d8\core\lib\Drupal\Core\Routing\RouteBuilder.php)
#0 C:\www\projects\sandbox_d8\core\lib\Drupal\Core\ProxyClass\Routing\RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
#1 C:\www\projects\sandbox_d8\core\includes\common.inc(1170): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#2 C:\www\projects\sandbox_d8\core\modules\system\src\Controller\DbUpdateController.php(650): drupal_flush_all_caches()
#3 C:\www\projects\sandbox_d8\core\includes\batch.inc(454): Drupal\system\Controller\DbUpdateController::batchFinished(false, Array, Array, Object(Drupal\Core\StringTranslation\TranslatableMarkup))
#4 C:\www\projects\sandbox_d8\core\includes\batch.inc(98): _batch_finished()
#5 C:\www\projects\sandbox_d8\core\modules\system\src\Controller\DbUpdateController.php(186): _batch_page(Object(Symfony\Component\HttpFoundation\Request))
#6 [internal function]: Drupal\system\Controller\DbUpdateController->handle('start', Object(Symfony\Component\HttpFoundation\Request))
#7 C:\www\projects\sandbox_d8\core\lib\Drupal\Core\Update\UpdateKernel.php(115): call_user_func_array(Array, Array)
#8 C:\www\projects\sandbox_d8\core\lib\Drupal\Core\Update\UpdateKernel.php(76): Drupal\Core\Update\UpdateKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request))
#9 C:\www\projects\sandbox_d8\update.php(28): Drupal\Core\Update\UpdateKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#10 {main}.
Any insights into this would be appreciated. At this point, I'm just needing to get the database updates applied but it's getting hung up on something and I can't figure out what it is. Since I couldn't find anything about any of this anywhere, I thought posting about this here might help in case anyone else comes across this. (I've posted about this in the forum, too, so if I see any responses to that which result in a solution, I'll update this with it.) But I thought this might be a bug, so if anyone has any insight into this, it would be appreciated.