0

We are creating our own D8 installation profile from previously built site. We exported config and split it to modules, so that our custom modules are defining their own configs.

We've had a lot of issues, basically because we don't know how to debug site installation. XDebug seems to catch nothing. But now I've gotten pretty far, modules do get installed, but the configuration import fails on following error:

[ERROR] The "file" entity type does not exist.

Error gets thrown at Drupal\Component\Plugin\Discovery\DiscoveryTrait.php, but sadly I'm not able to get PHPStorm's debugger to catch that file.

protected function doGetDefinition(array $definitions, $plugin_id, $exception_on_invalid) {
    // Avoid using a ternary that would create a copy of the array.
    if (isset($definitions[$plugin_id])) {
      return $definitions[$plugin_id];
    }
    elseif (!$exception_on_invalid) {
      return NULL;
    }

    throw new PluginNotFoundException($plugin_id, sprintf('The "%s" plugin does not exist.', $plugin_id));
  }

So basically I'd need a way to debug this installation via profile or some way to find out which config file is responsible. I'm finding this unnecessarily difficult, so any help is appreciated.

Cheers,

Janne

0

Yeah, got this sorted.

The reason for this strange behavior was unsurprisingly misconfigured field in some entity's baseFieldDefinition method.

Someone had used in display plugin configuration "file" instead of correct "file_generic" and for some reason this hadn't been triggered before this. The app has been live for about 6 months and gone through numerous updb's and entity-updates.

This was a nice one. I'll just leave this here in case someone has same mistakes :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.