Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
This is a bug fix for #2994702: Allow editors to alter embed-specific metadata, as well as `data-align` and `data-caption`
Using EditorMediaDialog to change alignment can leads to double alignment classes on the wrapper. This is due to the fact that the alignment classes are not cleared when the dialog is saved.
Proposed resolution
Since there are three classes, we need to maintain, we can just clear the classes before adding a new class.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#3 | double align classes.png | 62.16 KB | oknate |
#2 | 3081983-2.patch | 4.46 KB | oknate |
#2 | 3081983-2--FAIL.patch | 1.58 KB | oknate |
Comments
Comment #2
oknateHere's the fix, plus a FAIL patch that demonstrates the bug.
Comment #3
oknateComment #4
oknateComment #6
oknateComment #7
oknateComment #8
Wim LeersNice catch, solid test coverage, trivial fix. 👍🚢
Comment #9
effulgentsia CreditAttribution: effulgentsia at Acquia commentedCrediting @Wim Leers for review.
Comment #11
effulgentsia CreditAttribution: effulgentsia at Acquia commentedPushed to 8.8.x.
Comment #12
oknateThanks! This was a nice surprise on a Saturday night!