localgovdrupal / localgov_workflows

Default editorial workflow for LocalGov Drupal content.
GNU General Public License v2.0
0 stars 1 forks source link

Errors when installing site from existing configuration #63

Open Polynya opened 1 year ago

Polynya commented 1 year ago

This is related to https://github.com/localgovdrupal/localgov_directories/issues/244

There is an error when running drush site-install --existing-config, e.g.

In EntityType.php line 885:

  [LogicException]                                                                     
  Missing bundle entity, entity type node_type, entity id localgov_directories_venue.

The stack trace contains Drupal\Core\Config\Entity\ConfigEntityBase->save() at /var/www/html/web/modules/contrib/localgov_workflows/localgov_workflows.install:38

It's caused by the install hook expecting the content types to exist but the config hasn't been imported at this stage. This can be solved by moving the code into a post_update hook.

finnlewis commented 1 month ago

A year later and I am seeing a similar problem when importing configuration that enables localgov_workflows

 [error]  Error: Call to a member function getTypePlugin() on null in localgov_workflows_node_type_insert() 
 (line 109 of /var/www/html/web/modules/contrib/localgov_workflows/localgov_workflows.module)