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
Text fields in D6 have text formats. These fields are migrating with the cck_field_values migration but the formats are not converted to the new D8 machine_name as generated by the d6_filter_formats migration.
Proposed resolution
Add a text field process plugin.
Remaining tasks
Write patch and tests.
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#4 | 2394571-4.patch | 3.13 KB | benjy |
#1 | 2394571-1.patch | 3.19 KB | benjy |
Comments
Comment #1
benjy CreditAttribution: benjy commentedSee what bot says, patch should make sense, only weird thing is i'm removing nid and type from fieldData(). Don't think they're needed.
Comment #3
dawehnerDoes that mean we actually need a more functional level test coverage, so ensure that the migrated data can be actually rendered as expected?
Comment #4
benjy CreditAttribution: benjy commentedForgot to make an interdiff, looks like this:
@dawenher, yes, maybe an approach where we visited the rendered content and the edit pages in the admin after migrating? In this instance visiting the node would have shown a fatal error. Same can be said for #2394571: Filter formats on cck text fields are not looked up in the idMap and visiting the node edit here #2394567: File field need associated metadata during cck_field migration.
Comment #5
chx CreditAttribution: chx commentedThat's a long slippery slope. One could argue that after MigrateDrupal6Test you need to rerun every integration test... I have described this in blog posts in the past.
Comment #6
benjy CreditAttribution: benjy commentedThat's a great idea, we should at least do it once as a bug finding exercise.
Comment #7
chx CreditAttribution: chx commentederm, that would involve first rewriting the integration tests so they assert the things migratedrupal6test creates; unlikely to happen.
Comment #8
benjy CreditAttribution: benjy commentedWe could add integration tests that simply views/edits a few nodes and users etc after the full migration but that would get out of hand quickly. It would catch many of the fatal errors we're seeing now when doing common tasks like editing nodes but I believe many of these issues will be fixed quickly once a few more people are using the Migrate API.
How about a review on the patch from #4?
Comment #9
chx CreditAttribution: chx commentedRemind me, why do we map 0 to NULL?
SkipProcessOnEmpty
doesif (!$value) {
so it makes no difference there at least.Comment #10
benjy CreditAttribution: benjy commentedWe do that because in D6, the default format was 0 but in D8 it's NULL. We want to skip the process because we don't do any lookups for the default filter format.
Comment #11
chx CreditAttribution: chx commentedAh right! It's skip process not skip row. Early morning befuddling my brains.
Comment #12
alexpottMigration changes are unfrozen during beta. Committed d644718 and pushed to 8.0.x. Thanks!