Problem/Motivation
Follow-up to #2842222: D7 Plain text fields incorrectly migrated to D8 as Text (formatted)
D7 text and text_long fields with Plain text instances are now migrated as string and string_long fields.
Their widget types are incorrectly migrated as text_textfield and text_textarea instead of string_textfield and string_textarea.
Their formatter types are incorrectly migrated as text_default instead of string and basic_string.
Proposed resolution
To correctly map those widget/formatter types, we need to know both the field type and the widget/formatter type. This can be done with the new process_field plugin.
Remaining tasks
Code it. Review.
User interface changes
None.
API changes
New methods added to the FieldPluginBase:
* getFieldFormatterType()
* getFieldWidgetType()
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#10 | 2906203-10.patch | 12.53 KB | maxocub |
#8 | 2906203-8-review.txt | 12.53 KB | maxocub |
#8 | interdiff-2906203-6-8.txt | 3.06 KB | maxocub |
#8 | 2906203-8.patch | 143.38 KB | maxocub |
#6 | interdiff-2906203-2-6.txt | 1.68 KB | maxocub |
Comments
Comment #2
maxocub CreditAttribution: maxocub commentedHere's a first patch, including the patch in #2842222-136: D7 Plain text fields incorrectly migrated to D8 as Text (formatted).
New code is in the review file.
Comment #3
maxocub CreditAttribution: maxocub commentedThis code in FieldMigration seems wrong. Since the cckField plugins have been deprecated, we should look for fieldPluginManager before cckPluginManager.
I made the change here so my patch would work, but if someone think it should be it's own bug report, tell me and I'll open one.
Comment #4
maxocub CreditAttribution: maxocub commentedOups, I forgot to add docs here, since those are not on the interface.
I don't think we can add those to the interface without breaking BC, but is it OK to add them to the base class anyway?
Comment #6
maxocub CreditAttribution: maxocub commentedThe fact that the d6\TextField and d7\TextField plugin IDs are d6_text and d7_text is causing the tests to fail. The plugin ID is used in the static map and is supposed to represent the module. Since two plugins can't have the same ID, and since there's already a deprecated cck field plugin with the ID 'text', this ugly hack seems necessary. Anybody have a better idea?
Comment #7
heddnNice find and good fix.
I think adding this to the interface is fine. It isn't much of a break to BC and we are implementing it on the base class. I feel it is better to document the API than to leave it un-documented, just for the sake of maintaining some semblance of BC. un-documented == not adding to interface.
Deserves a comment.
Comment #8
maxocub CreditAttribution: maxocub commentedRe #7:
2. Added the methods to the interface.
3. Added a comment.
Comment #9
heddnLooks good here. Not just waiting on parent issue to unblock.
Comment #10
maxocub CreditAttribution: maxocub commentedUnpostponed and re-rolled.
Comment #11
heddnAll my feedback was addressed, we were just waiting to un-postpone on #2842222: D7 Plain text fields incorrectly migrated to D8 as Text (formatted). On to RTBC.
Comment #12
maxocub CreditAttribution: maxocub commentedAdded a change record.
Comment #16
catchCommitted/pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!
(heddn I failed to assign commit credit before commit, too keen to get the patch in, but adding it on the issue at least...).
Comment #17
maxocub CreditAttribution: maxocub for Acquia commentedComment #18
maxocub CreditAttribution: maxocub as a volunteer and for Acquia commented