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
Nodes that have a format of 0 which then gets mapped to NULL by the static map in the d6_node.yml file do not get imported because the filter is stubbed and we can't make NULL into a machine name so the Migration plugin throws a SkipRowException.
Proposed resolution
...
Remaining tasks
Figure out what to do.
User interface changes
n/a
API changes
n/a
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff.txt | 792 bytes | ultimike |
#11 | 2363643-11.patch | 3.17 KB | ultimike |
Comments
Comment #1
ultimikeWhat's the problem with setting the text format to "Basic HTML" (or maybe "Restricted HTML") in D8 when it is 0 in D6? Seems like this is an edge case, so why not make a reasonable guess and make a note of it in the docs?
-mike
Comment #2
benjy CreditAttribution: benjy commentedLets figure out what 0 means in D6, eg which filter gets applied and then like you say, map it to a more suitable filter that isn't "NULL".
Comment #3
ultimikeOk, so I figured out where a
format = 0
can come from.When a D6 content type has no body field, the body field is still there, just hidden. So, when nodes of this type are saved, the body field is empty, and the format is 0 (see https://api.drupal.org/api/drupal/modules%21node%21node.module/function/...).
So, I'm thinking that it is a safe assumption that any body fields with
format = 0
are probably null, so why not just set it to the D6 default text format ("Filtered HTML") which will be migrated normally.I've attached a patch to do exactly this.
Thoughts?
-mike
Comment #4
benjy CreditAttribution: benjy commentedYeah I like this approach, so simple. +1 for RTBC from me.
Comment #5
ultimikechx's idea (via our weekly meeting) is to map filter=0 to the filter_default_format value.
-mike
Comment #6
ultimikeNew patch based on suggestions in comment 5.
Thanks,
-mike
Comment #7
benjy CreditAttribution: benjy commentedLets use strict comparison here unless we also want to map an empty format to the default as well?
Comment #8
ultimikeBenjy,
Roger that. Updated patch attached.
-mike
Comment #10
benjy CreditAttribution: benjy commentedTry this:
Comment #11
ultimikeWow - that's annoying. Updated patch attached.
Thanks,
-mike
Comment #12
benjy CreditAttribution: benjy commentedGreat! Not sure if this is worth a mention in the handbook?
Comment #13
ultimikeAre you thinking maybe on the Known issues page?
-mike
Comment #14
benjy CreditAttribution: benjy commentedYeah, maybe just a one liner I guess? Can't do any harm :)
Comment #15
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per #2350615: [policy, no patch] What changes can be accepted during the Drupal 8 beta phase?. Committed 392522c and pushed to 8.0.x. Thanks!
Comment #17
ultimikeNote added to the Known issues page.
-mike