Sometimes removed filter plugins may still be in use in your Drupal website and lead to errors or pages not loading. If drush is installed, you can use it to fix this issue by deleting the offending configuration key. One such case where the Drupal install may end up in this situation is when you remove the filter plugin from composer. For example running composer remove on a plugin that's still in use.
composer remove drupal/markdown
Examples from the webserver logs (eg for Apache in /var/log/apache2/ssl.error.log) or in the Recent log messages panel in the Drupal UI
[Mon Jun 24 11:35:58.118491 2024] [php:notice] [pid 18890] [client 212.187.35.30:60802] Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: "The "markdown" plugin does not exist. Valid plugin IDs for Drupal\\filter\\FilterPluginManager are: editor_file_reference, filter_html, filter_htmlcorrector, filter_null, filter_image_lazy_load, filter_caption, filter_align, filter_autop, filter_html_image_secure, filter_url, filter_html_escape, filter_highlightjs" at /var/www/html/monids/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 53, referer: https://monids.com/admin/config/content/formats/manage/markdown/disable?destination=/admin/config/content/formats
List configs:
monids@monids-d8:/var/www/html/monids$ drush cget |grep -i mark
[289] filter.format.markdown
[309] markdown.parser.commonmark
Get conflicting config:
monids@monids-d8:/var/www/html/monids$ drush cget filter.format.markdown
uuid: 29a7b7f6-a412-4ded-87a6-0cfd673af29b
langcode: en
status: true
dependencies:
module:
- markdown
name: Markdown
format: markdown
weight: 0
filters:
markdown:
id: markdown
provider: markdown
status: true
weight: 0
settings:
Delete conflicting config
monids@monids-d8:/var/www/html/monids$ drush cdel filter.format.markdown
monids@monids-d8:/var/www/html/monids$ drush cdel markdown.parser.commonmark
Rebuild cache
monids@monids-d8:/var/www/html/monids$ drush cr
[success] Cache rebuild complete.