3

On several sites I've worked on, for whatever reason before I put my hands on it, the database seems to register a plugin that is no longer in config or code.

This usually goes as follows:

[error] Drupal\Component\Plugin\Exception\PluginNotFoundException: The "name-of-plugin" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition()

In D7, it was relatively straightforward to delete offending module entries from the database. What tables store plugin data so I can tell Drupal to stop looking for them and whitescreening when they can't be found?

1 Answer 1

7

Export the entire config, either in UI or via drush cex. Then make a full-text search for the plugin name. Remove the configuration causing the error and import the config again drush cim.

BTW if you turn on full error messages at admin/config/development/logging you see more info on which code is trying to load the plugin. This can point to a code line using a config object or a hard-coded plugin name.

If you can't access the admin UI because of the error add this option to settings.php:

/**
 * Show all error messages, with backtrace information.
 *
 * In case the error level could not be fetched from the database, as for
 * example the database connection failed, we rely only on this value.
 */
$config['system.logging']['error_level'] = 'verbose';

Or activate web/sites/example.settings.local.php from where this is copied.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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