When attempting to sychronise configuration via the UI, missing modules are not correctly identified. Additionally, once the missing modules are identified, the presence of those missing modules does not abort the import of the configurations.

This results in errors from attempting to access modules that do not exist on the site, and no message is displayed to the user to tell them why the sync operation has failed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gollyg created an issue. See original summary.

gollyg’s picture

gollyg’s picture

Status: Active » Needs review
FileSize
799 bytes

Incorrect property name was being passed via the UI, resulting in an empty array for missing modules.

Patch attached.

gollyg’s picture

Adding patch to abort the datastore import process when missing modules are found.

This address the problem that missing modules do not prevent the attempted import of configurations that have those missing dependencies.

The patch returns from the sync process and sets a message showing the modules required for install.

gollyg’s picture

Issue summary: View changes
Lord Pachelbel’s picture

I tried your patch and it triggered another issue. When I tried syncing changes, configuration reported that this module was missing: panels_node_hook

But there is no such module.

The only place I could find that string referenced is in panels_node.module:

function panels_node_node_info() {
  // Safety: go away if CTools is not at an appropriate version.
  if (!defined('PANELS_REQUIRED_CTOOLS_API') || !module_invoke('ctools', 'api_version', PANELS_REQUIRED_CTOOLS_API)) {
    return array();
  }

  return array(
    'panel' => array(
      'name' => t('Panel'),
      // We use panels_node_hook so that panels_node private
      // callbacks do not get confused with panels versions of
      // nodeapi callbacks. 
      'base' => 'panels_node_hook', 
      'body_label' => t('Teaser'), 
      'description' => t("A panel layout broken up into rows and columns."),
    ),
  );
}

So I think that 'base' key value is being interpreted as a module name.