Problem/Motivation
The Editor module provides two filter plugins that were backported from Drupal 8: editor_align
and editor_caption
.
This two filters are operating with the same control attributes (data-align
and data-caption
, respectively) as their Drupal 8 equivalents (filter_align
and filter_caption
), so they can be easily mapped to a valid filter plugin during Drupal 7 -> Drupal 8 migrations.
Proposed resolution
Provide mapping for these two filters:
- Map
editor_align
tofilter_align
- Map
editor_caption
tofilter_caption
Remaining tasks
* Patch.
* Test (?).
User interface changes
Nothing.
API changes
Nothing.
Data model changes
The editor_align
and editor_caption
filters are mapped to their corresponding Drupal 8 filters.
Comment | File | Size | Author |
---|---|---|---|
#17 | after.png | 86.33 KB | Wim Leers |
#17 | before.png | 92.59 KB | Wim Leers |
#17 | D7 SELECT from filter WHERE format LIKE filtered_html.png | 128.55 KB | Wim Leers |
#11 | interdiff-3106304-6-11.txt | 981 bytes | huzooka |
#11 | core-map_editor_filters-3106304-11.patch | 997 bytes | huzooka |
Comments
Comment #2
huzookaComment #3
huzookaComment #4
Wim LeersGreat, thanks!
Nit: this comment was referring to D7 core filters: they indeed did not change in D8.
The comment now needs to be expanded, to reflect that some D7 contrib filters now are part of D8 core. Hence D8 core needs to provide an upgrade path for those contrib filters.
Comment #5
huzookaComment #6
huzookaComment #7
huzooka@Wim Leers, thanks!
Comment #8
Wim LeersThanks!
Two more language nits:
→
"those are the Drupal 7 backport of some of the new filters in Drupal 8 core."
→
"Hence Drupal 8 core is responsible for providing"
After that, this is RTBC 🥳
Comment #9
Wim LeersComment #10
huzookaComment #11
huzookaAddressing #8.
Comment #12
huzookaComment #13
Wim LeersAs the de facto maintainer of
filter
module, the official maintainer ofeditor
module and the primary author of the D7/D8 filters involved in this patch, I think this is RTBC.Comment #14
Wim Leers(FWIW: test coverage here in
\Drupal\Tests\filter\Kernel\Migrate\d7\MigrateFilterFormatTest::testFilterFormat()
could be added, but it would not really add anything. We'd just be testing that the\Drupal\migrate\Plugin\migrate\process\StaticMap
process plugin is working as designed.)Comment #15
Wim LeersOops!
Comment #16
quietone CreditAttribution: quietone as a volunteer commentedHas this has any manual testing?
Comment #17
Wim LeersSorry, should have called that out.
Yes, it has been manually tested. I just did so again just to prove it:
Comment #21
catchCommitted/pushed to 9.1.x and cherry-picked back to 8.9.x, thanks!