Relevant system info:

Ubuntu 16.04.2
PHP 7.0.15
Apache 2.4.18
PostgreSQL 9.6.2

I've been trying to update to 8.3.0 using Drush which is installed globally and up to date

$ which drush
/usr/local/bin/drush
$ drush --version
 Drush Version   :  8.1.10

Running `drush up drupal` fails and leaves the database in an unusable state, forcing me to roll back the server and the database. It seems to complain and fail doing something with the experimental Workflow module that's been added to 8.3.0

$ drush up drupal
Update information last refreshed: Fri, 04/07/2017 - 16:02
 Name    Installed Version  Proposed version  Message
 Drupal  8.2.7              8.3.0             Update available


Code updates will be made to drupal core.
WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

Do you really want to continue? (y/n): y
Project drupal was updated successfully. Installed version is now 8.3.0.
Backups were saved into the directory /tmp/drush-backups/databasename/20170407230225/drupal.                                  [ok]
The following updates are pending:

system module :
  8300 -   Add detailed cron logging configuration.
  8301 -   Add install profile to core.extension configuration.

block_content module :
  8300 -   Fix the block_content entity type to specify its revision data table.

node module :
  8300 -   Change {node_access}.fallback from an int to a tinyint as it is a boolean.
  8301 -   Set the 'published' entity key.

comment module :
  8300 -   Update status field.
  8301 -   Set the 'published' entity key.

image module :
  8201 -   Flush caches as we changed field formatter metadata.

block module :
  Disable blocks that are placed into the "disabled" region.

system module :
  Update entity displays to contain the region for each field.
  Force caches using hashes to be cleared (Twig, render cache, etc.).
  Force plugin definitions to be cleared.   @see https:www.drupal.orgnode2802663

user module :
  Enforce order of role permissions.

views module :
  Rebuild caches to ensure schema changes are read in.

Do you wish to run all pending updates? (y/n): y
Performing system_update_8300                                                                                               [ok]
Performing node_update_8300                                                                                                 [ok]
Performing comment_update_8300                                                                                              [ok]
Performing system_update_8301                                                                                               [ok]
The "workflow" entity type does not exist.                                                                                  [error]
Performing block_content_update_8300                                                                                        [ok]
Performing node_update_8301                                                                                                 [ok]
Performing comment_update_8301                                                                                              [ok]
Performing image_update_8201                                                                                                [ok]
Error: Class 'Drupal\workflows\Entity\Workflow' not found in /var/www/html/core/modules/content_moderation/content_moderation.module on line 224 #0 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(501): content_moderation_entity_bundle_info_alter(Array, NULL, NULL)
#1 /var/www/html/core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php(110): Drupal\Core\Extension\ModuleHandler->alter('entity_bundle_i...', Array)
#2 /var/www/html/core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php(80): Drupal\Core\Entity\EntityTypeBundleInfo->getAllBundleInfo()
#3 /var/www/html/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php(95): Drupal\Core\Entity\EntityTypeBundleInfo->getBundleInfo('block')
#4 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver->getDerivativeDefinitions(Array)
#5 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#6 /var/www/html/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(283): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#7 /var/www/html/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(174): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
#8 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#9 /var/www/html/core/lib/Drupal/Core/TypedData/DataDefinition.php(193): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('field_item:bool...')
#10 /var/www/html/core/lib/Drupal/Core/Field/BaseFieldDefinition.php(566): Drupal\Core\TypedData\DataDefinition->getClass()
#11 /var/www/html/core/lib/Drupal/Core/Field/BaseFieldDefinition.php(555): Drupal\Core\Field\BaseFieldDefinition->getFieldItemClass()
#12 /var/www/html/core/lib/Drupal/Core/Field/BaseFieldDefinition.php(485): Drupal\Core\Field\BaseFieldDefinition->getMainPropertyName()
#13 /var/www/html/core/lib/Drupal/Core/Entity/EntityFieldManager.php(219): Drupal\Core\Field\BaseFieldDefinition->setDefaultValue(true)
#14 /var/www/html/core/lib/Drupal/Core/Entity/EntityFieldManager.php(171): Drupal\Core\Entity\EntityFieldManager->buildBaseFieldDefinitions('block_content')
#15 /var/www/html/core/lib/Drupal/Core/Entity/EntityFieldManager.php(394): Drupal\Core\Entity\EntityFieldManager->getBaseFieldDefinitions('block_content')
#16 /var/www/html/core/lib/Drupal/Core/Entity/EntityManager.php(154): Drupal\Core\Entity\EntityFieldManager->getFieldStorageDefinitions('block_content')
#17 /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(282): Drupal\Core\Entity\EntityManager->getFieldStorageDefinitions('block_content')
#18 /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(665): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getTableMapping()
#19 /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(428): Drupal\Core\Entity\Sql\SqlContentEntityStorage->buildQuery(NULL)
#20 /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(399): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getFromStorage(NULL)
#21 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(242): Drupal\Core\Entity\Sql\SqlContentEntityStorage->doLoadMultiple(NULL)
#22 /var/www/html/core/modules/block_content/src/Plugin/Derivative/BlockContent.php(46): Drupal\Core\Entity\EntityStorageBase->loadMultiple()
#23 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\block_content\Plugin\Derivative\BlockContent->getDerivativeDefinitions(Array)
#24 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#25 /var/www/html/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(283): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#26 /var/www/html/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(174): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
#27 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#28 /var/www/html/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('system_menu_blo...')
#29 /var/www/html/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(76): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('system_menu_blo...', Array)
#30 /var/www/html/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(65): Drupal\Component\Plugin\PluginManagerBase->createInstance('system_menu_blo...', Array)
#31 /var/www/html/core/modules/block/src/BlockPluginCollection.php(57): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin('system_menu_blo...')
#32 /var/www/html/core/lib/Drupal/Component/Plugin/LazyPluginCollection.php(80): Drupal\block\BlockPluginCollection->initializePlugin('system_menu_blo...')
#33 /var/www/html/core/modules/block/src/BlockPluginCollection.php(45): Drupal\Component\Plugin\LazyPluginCollection->get('system_menu_blo...')
#34 /var/www/html/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(72): Drupal\block\BlockPluginCollection->get('system_menu_blo...')
#35 /var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(320): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->getConfiguration()
#36 /var/www/html/core/modules/block/src/Entity/Block.php(337): Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object(Drupal\Core\Config\Entity\ConfigEntityStorage))
#37 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(434): Drupal\block\Entity\Block->preSave(Object(Drupal\Core\Config\Entity\ConfigEntityStorage))
#38 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(389): Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\block\Entity\Block))
#39 /var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(259): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\block\Entity\Block))
#40 /var/www/html/core/lib/Drupal/Core/Entity/Entity.php(364): Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\block\Entity\Block))
#41 /var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(637): Drupal\Core\Entity\Entity->save()
#42 /var/www/html/core/modules/block/block.module(153): Drupal\Core\Config\Entity\ConfigEntityBase->save()
#43 [internal function]: block_rebuild()
#44 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(402): call_user_func_array('block_rebuild', Array)
#45 /var/www/html/core/includes/common.inc(1133): Drupal\Core\Extension\ModuleHandler->invokeAll('rebuild')
#46 phar:///usr/local/bin/drush/commands/core/drupal/update.inc(120): drupal_flush_all_caches()
#47 phar:///usr/local/bin/drush/commands/core/drupal/batch.inc(163): drush_update_cache_rebuild(Object(DrushBatchContext))
#48 phar:///usr/local/bin/drush/commands/core/drupal/batch.inc(111): _drush_batch_worker()
#49 phar:///usr/local/bin/drush/includes/batch.inc(98): _drush_batch_command('22')
#50 phar:///usr/local/bin/drush/commands/core/drupal/update.inc(193): drush_batch_command('22')
#51 phar:///usr/local/bin/drush/commands/core/core.drush.inc(1227): _update_batch_command('22')
#52 phar:///usr/local/bin/drush/includes/command.inc(422): drush_core_updatedb_batch_process('22')
#53 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#54 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command('22')
#55 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#56 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#57 phar:///usr/local/bin/drush/includes/startup.inc(458): drush_main()
#58 phar:///usr/local/bin/drush/includes/startup.inc(365): drush_run_main(false, '/', 'Phar detected. ...')
#59 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#60 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#61 {main}
Error: Class 'Drupal\workflows\Entity\Workflow' not found in content_moderation_entity_bundle_info_alter() (line 224 of /var/www/html/core/modules/content_moderation/content_moderation.module).
Drush command terminated abnormally due to an unrecoverable error.                                                          [error]
PHP Fatal error:  Uncaught Error: Class 'Drupal\workflows\Entity\Workflow' not found in /var/www/html/core/modules/content_moderation/content_moderation.module:224
Stack trace:
#0 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(501): content_moderation_entity_bundle_info_alter(Array, NULL, NULL)
#1 /var/www/html/core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php(110): Drupal\Core\Extension\ModuleHandler->alter('entity_bundle_i...', Array)
#2 /var/www/html/core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php(80): Drupal\Core\Entity\EntityTypeBundleInfo->getAllBundleInfo()
#3 /var/www/html/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php(95): Drupal\Core\Entity\EntityTypeBundleInfo->getBundleInfo('block')
#4 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver->getDerivativeDefinitions(Array)
#5 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drup in /var/www/html/core/modules/content_moderation/content_moderation.module on line 224
Drush command terminated abnormally due to an unrecoverable error.                                                          [error]
Error: Uncaught Error: Class 'Drupal\workflows\Entity\Workflow' not found in
/var/www/html/core/modules/content_moderation/content_moderation.module:224
Stack trace:
#0 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(501): content_moderation_entity_bundle_info_alter(Array,
NULL, NULL)
#1 /var/www/html/core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php(110):
Drupal\Core\Extension\ModuleHandler->alter('entity_bundle_i...', Array)
#2 /var/www/html/core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php(80):
Drupal\Core\Entity\EntityTypeBundleInfo->getAllBundleInfo()
#3 /var/www/html/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php(95):
Drupal\Core\Entity\EntityTypeBundleInfo->getBundleInfo('block')
#4 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101):
Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver->getDerivativeDefinitions(Array)
#5 /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drup in
/var/www/html/core/modules/content_moderation/content_moderation.module, line 224
The external command could not be executed due to an application error.                                                     [error]
Finished performing updates.                                                                                                [ok]

I've tried installing the update manually and ran into the same error. I'm at a loss about what to do from here, any help would be greatly appreciated. Thank you!

Comments

pixelsweatshop’s picture

A search for your error in Google returned:

https://www.drupal.org/node/2867732

Which says you need to uninstall Content Moderation before upgrading to 8.3.0. THis module is still experimental and you should expect that it will be a pain until it is stable.

As per the release notes at https://www.drupal.org/project/drupal/releases/8.3.0

Important: If you previously installed Content Moderation in 8.2.x, you must uninstall it before upgrading to 8.3.0 or you will encounter fatal errors. You will need to reconfigure your workflows and transitions with the new module after upgrading and re-enabling Content Moderation, so be sure to back them up beforehand. (No upgrade path is supplied since the module is still alpha stability.)

jpiel’s picture

Thank you for pointing that out! That was indeed the issue, I was able to update once I uninstalled Content Moderation.

pixelsweatshop’s picture

Always try a google search for your errors before posting. More than likely someone has had your error before.

All I did is paste the first error into google:

Error: Class 'Drupal\workflows\Entity\Workflow' not found in /var/www/html/core/modules/content_moderation/content_moderation.module on line 224 #0 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(501): content_moderation_entity_bundle_info_alter(Array, NULL, NULL

And the first result was the answer.

Sometimes, you may have to remove the paths of your specific doc root or even shorten it to get a result.

Remove what is in bold:

Error: Class 'Drupal\workflows\Entity\Workflow' not found in /var/www/html/core/modules/content_moderation/content_moderation.module on line 224 #0 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(501): content_moderation_entity_bundle_info_alter(Array, NULL, NULL

or even:

Error: Class 'Drupal\workflows\Entity\Workflow' not found in /modules/content_moderation/content_moderation.module on line 224

Good luck

jpiel’s picture

I use DuckDuckGo as my primary search engine which oddly enough didn't find any relevant results. You're right though, I should have tried using Google search as well.

Thanks for your help, I appreciate it.

pixelsweatshop’s picture

While duckduckgo is a nice alternative, Google has perfected the search for developers.