2

When I googled for this error, I found numerous hits mentioning the error message appearing during a migration, even stopping it. While I have done a migration from Drupal 7 to 9 that ran smoothly, this is during normal running of the now Drupal 9-based site.

E.g. I create a new content. As soon as I select the content type and the content form appears, I get this error. So it is probably not related to text formats.

I have no idea how to provide the missing filter plugin. I searched a database dump and found several occurrences of "filter_null". Most notably in the tables "config", "key_value" and "key_value_expire"(!).

But I did not find "filter_null" or any other "filter_<something"> in the Drupal user interface. I did find code related to it, most notably the file core/modules/filter/src/Plugin/Filter/FilterNull.php.

Can anyone tell me the trick to provide that filter? I'm still running 9.3.7, installing 9.3.8 is next on my agenda. But it does not look like there is any changed that relates to this error.

3 Answers 3

7

This is what happens when a filter in the Drupal 7 site doesn't exist in the Drupal 9 site: It gets replaced in the configuration by a filter_null reference. If you need the functionality of the missing filter, you should find a Drupal 9 equivalent and install it.

To solve your immediate problem, you can very easily remove the filter_null references by simply editing each of your text formats listed on Administration > Configuration > Content authoring > Text formats and editors and saving them. There is no need to make any change; just click on the Save button.

2
  • I I think I wasn't clear enough. Let me try again: Maybe I do need the functionality of a missing filter, namely textile, but that's beside the point. I need it for another site, not the one in question. Shift Plain Text to the top of the list of text formats; make sure that creating a new content triggers the error; create a copy of Plain Text (the original is protected) called Plain Text2, without changes; create new content. The error message still occurs. What now?
    – Arture
    Mar 18, 2022 at 16:51
  • To get rid of the messages, follow the instruction in my second paragraph. Mar 18, 2022 at 17:11
0

Go to /admin/config/content/formats and ensure that all of your text editors read CKEditor. That corrected it for me as many were reading "none" after migration.

2
  • I don't think that's the culprit, especially as going through all the formats, I found something when I opened the PHP filter: The filter_null filter is missing, and will be removed once this format is saved. Once at the top, and another between the editor selection and "Enabled filters". (With CKEditor, that's between the Editor selection and the CKEditor settings.) I intended to look at the CKEditor later. If I had done that earlier, I would have found that message. Thanks for pointing me in the right direction!
    – Arture
    Apr 5, 2022 at 14:25
  • And the error is gone.
    – Arture
    Apr 5, 2022 at 14:32
0

If you work with the Drupal config files, you can check files such as config/filter_format*.yml

You can replace the filters value from

filters:
  filter_null:
    id: filter_null
    provider: filter
    status: true
    weight: 0
    settings: {  }

to

filters: { }

Then import back the config (drush cim).

Your Answer

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

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