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
Migrating D6 to D8
When migrating node reference fields from a D6 site to a D8 site, I get the following error:
The "nodereference_buttons" plugin does not exist. (\core\lib\Drupal\Component\Plugin\Discovery\DiscoveryTrait.php:52)
In nodereference.mode, there's 3 widget types:
function nodereference_widget_info() {
return array(
'nodereference_select' => array([...]),
'nodereference_buttons' => array([...]),
'nodereference_autocomplete' => array([...]),
),
);
}
But in d6_field_instance_widget_settings.yml, we only have a mapping for nodereference_select:
'options/type':
type:
plugin: static_map
bypass: true
source: widget_type
map:
number: number
email_textfield: email_default
date_select: datetime_default
date_text: datetime_default
date_popup: datetime_default
imagefield_widget: image_image
phone_textfield: telephone_default
optionwidgets_onoff: boolean_checkbox
optionwidgets_buttons: options_buttons
optionwidgets_select: options_select
nodereference_select: options_select
userreference_select: options_select
Proposed resolution
Add the missing mappings:
- nodereference_buttons
- nodereference_autocomplete
Remaining tasks
Write a patch
Review
User interface changes
None.
API changes
None.
Data model changes
None.
Problem
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff-2924570-7-13.txt | 2.84 KB | maxocub |
#13 | 2924570-13.patch | 8.14 KB | maxocub |
Comments
Comment #2
Rajesh Kairamkonda CreditAttribution: Rajesh Kairamkonda commentedComment #3
Rajesh Kairamkonda CreditAttribution: Rajesh Kairamkonda commentedComment #4
Rajesh Kairamkonda CreditAttribution: Rajesh Kairamkonda commentedComment #5
heddnDropping priority per https://www.drupal.org/core/issue-priority#critical-bug. There are very likely some work around here. Also moving back to active. There's no patch so we leave it active until the first patch is provided.
What version of nodereference are you using on the D6 side. Is the "nodereference_buttons" source field a standard nodereference field type or something custom?
Comment #7
maxocub CreditAttribution: maxocub as a volunteer commentedHere's a patch and a failing test.
Beside the missing 'nodereference_buttons' mapping, there's also 'nodereference_autocomplete' that was missing.
Comment #9
heddnI'll try to look at this sometime soon.
Comment #10
heddnWe've got tests! We've got fixes. The fixes look complete. IS is updated. We are good to go.
Comment #11
quietone CreditAttribution: quietone at Acro Commerce commentedComment #12
alexpottDo we not want to test migrating a real value too?
Comment #13
maxocub CreditAttribution: maxocub as a volunteer commentedThere you go!
Comment #14
heddnBack to RTBC.
Comment #15
alexpottCrediting @rkairam for finding and creating the issue and @heddn for issue triage and review.
Comment #16
alexpottCommitted and pushed 96a368c6c6 to 8.6.x and 71c1fb90ce to 8.5.x. Thanks!