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
The Link field migration plugin system currently does not map all the field formatters from D7 to D8/D9.
Proposed resolution
D7 has these field formatters `link_default`, `link_title_plain`, `link_host`, `link_url`, `link_plain`, `link_absolute`, `link_domain`, `link_no_protocol`, `link_short`, `link_label` and `link_separate`. Out of which mapping of only `link_default` is done. Resolution is to map all Link module's field formatters from D7 to D8/D9.
Remaining tasks
Patch
Review
Commit
Comment | File | Size | Author |
---|---|---|---|
#7 | 3212539-link-field-formatter-mapping-7.patch | 1.86 KB | n4r3n |
#2 | 3212539-link-field-formatter-mapping-2.patch | 801 bytes | n4r3n |
Comments
Comment #2
n4r3nThis patch provides link module's field formatter mapping.
Comment #3
n4r3nComment #5
quietone CreditAttribution: quietone as a volunteer commented@n4r3n, are these formatters in Drupal 7 core or are they supplied by contrib?
Comment #6
Wim LeersThanks for starting this issue & patch, @n4r3n! 🙏
They're in D7 contrib, but for a module that was moved into core: the Link module: https://git.drupalcode.org/project/link/-/blob/7.x-1.x/link.module#L1210. For all other contrib-modules-providing-field-types-that-now-live-in-Drupal-8-core cases, we've specified the mapping in core. So I think we should do the same here.
@n4r3n Looks like you'll need to update the expectations in
\Drupal\Tests\migrate_drupal\Kernel\d7\FieldDiscoveryTest::addAllFieldProcessesAltersData()
— once you do that tests should pass! 😊👍Comment #7
n4r3nThank you for reviewing it, here is the patch with updated test case.
Comment #8
Wim LeersThat looks great! Will manually test in the morning 🤓
Comment #9
Wim LeersManually tested, works beautifully! 👏
This does not migrate the field formatter settings, but that is also not the case for the pre-existing
link_default
formatter (itscustom_title
setting is not migrated).Therefore: this is a net improvement for everyone — migrating the formatter settings is out of scope here. Because doing that would require not just adding it for these new mappings, but also for the pre-existing
link_default
mapping.Comment #12
catchCommitted/pushed to 9.3.x and cherry-picked to 9.2.x and 9.1.x, thanks!
Comment #14
quietone CreditAttribution: quietone as a volunteer commented