Question

I performed a pretty massive 50,000+ node migration a few weeks ago (from Drupal 7.70 to Drupal 8.9), and just noticed today that some of the Text Filters aren't visible in content creation pages (in particular, Plain text filter, which is what I like to make the default for most fields).

I tried creating a similar filter called "Plain", but when defining the default filter for content types on text fields, though at least now the new filter is visible as on option from the select box, it won't save (it reverts back to Full HTML filter on save). Furthermore, the filter permissions page shows that something is awry as well...as I am unable to assign ANY permissions for the new filter or two of the migrated filters to any custom roles.

Clearly the migration didn't go smoothly. It took me 2 weeks to get ANY migration to work properly...so I really do no want to roll back and try again if possible. Is there any way I an fix the text filters and their respective permissions problem here?

I have full access to the server, mysql, etc. Is there something I should be looking for in particular? Or at least a DB model that I can copy?

Thanks in advance for your help.

enter image description here enter image description here enter image description here

EDIT: I just noticed that I can go into the individual user roles, and "see" the checkboxes that aren't showing up on the Permissions matrix (where you can select permissions for all users at once). Is this maybe just a rendering bug for the main permissions display page? Here's another screenshot:

enter image description here

Était-ce utile?

La solution

This is a usability quirk of D8, in the Drupal Form UI the default format type for formatted text fields isn't configurable; it's dynamic based off form element properties (set by a developer), user role permissions, and the filter module settings (see form code)

By default, the fallback format (Plain text here) won't show as an option. There are a few things you can do here:

  • Set Plain text as the highest priority filter, if you want it to be the default for all formatted text fields.
  • Enable the always_show_fallback_choice config option (e.g. drush config-set filter.settings always_show_fallback_choice true), if you just want the format to be available.
  • Use the Allowed Formats module, if you need some type of per-field configuration.

Autres conseils

If you want to set "Plain text" to be the default format on new posts in your browser, go to "admin/config/content/formats" and put "Plain text" at the top of your text formats list.

From that page click on the configure button to set the text "filters" on your "Plain text format", for line breaks, HTML, etc.

When you create a new post it should be using the "Plain text" filter by default.

With regard to why certain text formats aren't available in the permissions settings after migrating to D8, you should check the Known Issues when upgrading page. For example, the PHP code filter is not supported in D8 core.

Licencié sous: CC-BY-SA avec attribution
Non affilié à drupal.stackexchange
scroll top