PluginNotFoundException: The "custom" plugin does not exist

Created on 26 May 2025, about 1 month ago

Problem/Motivation

[error]  Drupal\Component\Plugin\Exception\PluginNotFoundException: The "custom" plugin does not exist. Valid plugin IDs for Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorManager are:  in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /var/www/html/drupal/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php). 
 [error]  Drupal\Core\Entity\EntityStorageException: The "custom" plugin does not exist. Valid plugin IDs for Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorManager are:  in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (line 763 of /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 
 [error]  Drupal\Core\Entity\EntityStorageException: The "custom" plugin does not exist. Valid plugin IDs for Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorManager are:  in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 
 [error]  The "custom" plugin does not exist. Valid plugin IDs for Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorManager are:  (/var/www/html/drupal/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:817) 

Steps to reproduce

This happened during migration via: drush migrate:sync

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

4.2

Component

Code

Created by

🇬🇧United Kingdom kenorb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kenorb
  • 🇷🇺Russia walkingdexter

    Need more detailed steps to reproduce.

  • 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱

    I ran into what appears to be the same issue and I think it is mostly unrelated to migration. There is an easy workaround, which is to remove the plugin reference from the configuration. Nevertheless, it can give some nasty effects when disabling a module that contains UrlGenerator plugins that are in use. I added some steps to reproduce.

    I *assume* the OP was having this situation too. If not, my apologies. Let me know, than I'll create a different issue. Of course, the same could happen if the "custom" plugin got its plugin ID changed, which is basically the same thing; the configured plugin is no longer available.

  • 🇩🇪Germany gbyte Berlin

    Shouldn't the module that implements the custom generator plugin also make sure its plugins are not being used during uninstall? I don't think it's something we should address here.

  • 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱

    Correct me if I'm wrong, but shouldn't Simple XML Sitemap keep track of dependencies to other modules when a plugin is added to its configuration?

  • 🇩🇪Germany gbyte Berlin

    Correct me if I'm wrong, but shouldn't Simple XML Sitemap keep track of dependencies to other modules when a plugin is added to its configuration?

    What would that tracking look like exactly? Any examples in the wild?

  • 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
Production build 0.71.5 2024