Validation of text filter order results in unexpected results

Created on 28 August 2023, over 1 year ago

Problem/Motivation

When a validation error occurs on the order of text filters, the order of the filters on the page that shows the errors is unexpected and counter-intuitive.

Steps to reproduce

  1. Fresh Drupal 10 site.
  2. Disable CKEditor module.
  3. Enable Media module.
  4. Edit "Basic HTML" text format.
  5. Enable "Embed media" filter.
  6. Drag "Embed media" filter to top of "Filter processing order".
  7. Click save.
  8. (Ignore the "The Embed media filter requires <drupal-media> among the allowed HTML tags." error.)
  9. Note that the "Embed media" filter is at the bottom of the "Filter processing order" - seemingly in the correct location.
  10. Click save.
  11. Note the "The Embed media filter needs to be placed after the following filters: Align images, Caption images, Restrict images to this site." validation error still occurs.
  12. Click on "Show row weights" to see that the weight of the "Embed media" filter indicates it should be at the top of the list still. This is counter-intuitive. The only way to get past this validation error is for the user to either manually modify the weight value, or drag and drop the "Embed media" filter up, then down, in order to reset the weights.

Proposed resolution

When the validation error occurs, the list should be in the proper order.

Remaining tasks

Make it better.

πŸ› Bug report
Status

Active

Version

10.1 ✨

Component
FormΒ  β†’

Last updated 7 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA

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

Comments & Activities

Production build 0.71.5 2024