- Issue created by @gigimaor
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
You need to update your config to use bundle:node
- π¦πΊAustralia gigimaor Narangba/Brisbane
Thank you Lee
In my case, the configurations are being ignored, and our Drupal is used on multiple websites. Some of them might return errors after the upgrade.
I suggest manually deselecting the node bundle, before the upgrade, and selecting a different visibility solution instead. Missing doing that could cause a cross-website error.I used a post-update function to migrate all node types to bundle:node, as Lee suggested above, to run it during the upgrade deployment process or after.
/** * Fix script_manager module node_type issue. * */ function ua_post_update_script_manager_node_type(){ // Fix script manager settings. $config_factory = \Drupal::service('config.factory'); $script_manager_settings = $config_factory->listAll('script_manager.settings'); $config = $config_factory->getEditable($script_manager_settings[0]); $enabled_visibility_plugins = $config->get('enabled_visibility_plugins'); if (is_array($enabled_visibility_plugins)) { $enabled_visibility_plugins = array_replace($enabled_visibility_plugins, array_fill_keys( array_keys($enabled_visibility_plugins, 'node_type'), 'entity_bundle:node' ) ); $config->set('enabled_visibility_plugins', $enabled_visibility_plugins); $config->save(); } // Fix script manager items. $config_factory = \Drupal::service('config.factory'); $script_manager_configurations = $config_factory->listAll('script_manager.script'); foreach ($script_manager_configurations as $config_name) { // Load the block configuration. $config = $config_factory->getEditable($config_name); // Check for a value and update it if needed. if (is_array($config->get('visibility.node_type'))) { if ($config->get('visibility.node_type')['id'] === 'node_type') { $config->set('visibility.node_type.id', 'entity_bundle:node'); $config->save(); } } } }