Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
migration system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 Oct 2014 at 06:56 UTC
Updated:
15 Nov 2014 at 16:14 UTC
Jump to comment: Most recent, Most recent file
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 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 = 0can 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 = 0are 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 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 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 commentedTry this:
Comment #11
ultimikeWow - that's annoying. Updated patch attached.
Thanks,
-mike
Comment #12
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 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