Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295840

Drupal 10 updating issue - Drupal\Component\Plugin\Exception\PluginNotFoundException: The "<whatever>" plugin does not exist

$
0
0

Problem/Motivation

As mentioned in the title "Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist"

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "blazy_filter" plugin does not exist. Valid plugin IDs for Drupal\filter\FilterPluginManager are: editor_file_reference, filter_caption, filter_url, filter_null, filter_autop, filter_htmlcorrector, filter_html, filter_html_image_secure, filter_align, filter_html_escape, media_embed, video_embed_wysiwyg in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Steps to reproduce

  1. Create a new Drupal instance
  2. Install a new filter plugin (you can install drupal/blazy)
  3. Dump the database ^^ (I use ddev export-db)
  4. Now disable the installed module (maybe drupal/blazy)
  5. Export your configuration
  6. Import the dump (I use ddev import-db)
  7. Run drush cim

Why dump/import db ? Let's say you have a production website with drupal/blazy, then you read the news "Drupal 9 support lazy loading". Now you did some changes in your Local environnement, removing drupal/blazy (I'm not against keeping it :lol). Now you will need to deploy this ? Don't ^^ The "" plugin does not exist

Proposed resolution

Something :lol:. core/modules/filter/src/Element/ProcessedText.php run all the time (even with drush cim -_- ) and call

    /** @var \Drupal\filter\Entity\FilterFormat $format **/
    $format = FilterFormat::load($format_id);

Which simply load all the filters (you are trying to remove one with drush cim). Well you can't ask for something you are trying to remove bro.

:tada:

Maybe adding a new check for providers before loading the filters ??

      $provider = $this->extractProviderFromDefinition($plugin_definition);
      if ($provider && !in_array($provider, ['core', 'component']) && !$this->providerExists($provider)) {
        unset($definitions[$plugin_id]);
      }

I can't find the loading function

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295840

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>