When doing a config install of the site, the node type imports fail due to the missing editorial workflow.
It's not major as the editorial workflow is installed later and the is set up as part of the exported config.
However we should check that the workflow exists before adding it.
Its line 96 on localgov_workflows.module.
$type = $editorial->getTypePlugin();
My temp solution was to check if it was empty so I could bypass and run the config install.
/**
* Implements hook_ENTITY_TYPE_insert().
*/
function localgov_workflows_node_type_insert(NodeTypeInterface $node_type) {
// Add workflow to new localgov_ node bundle with no other workflow.
if (strpos($node_type->id(), 'localgov_') === 0) {
$types = \Drupal::service('entity_type.bundle.info')->getBundleInfo('node');
if (empty($types['node']['workflow'])) {
$editorial = Workflow::load('localgov_editorial');
if (!empty($editorial)) {
$type = $editorial->getTypePlugin();
$type->addEntityTypeAndBundle('node', $node_type->id());
$editorial->save();
}
}
}
}
When doing a config install of the site, the node type imports fail due to the missing editorial workflow. It's not major as the editorial workflow is installed later and the is set up as part of the exported config. However we should check that the workflow exists before adding it.
Its line 96 on localgov_workflows.module.
$type = $editorial->getTypePlugin();
My temp solution was to check if it was empty so I could bypass and run the config install.Stack trace.