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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rkairam created an issue. See original summary.

Rajesh Kairamkonda’s picture

Assigned: Rajesh Kairamkonda » Unassigned
Category: Support request » Bug report
Priority: Normal » Critical
Issue summary: View changes
Rajesh Kairamkonda’s picture

Status: Active » Needs work
Rajesh Kairamkonda’s picture

Project: drupal8 study git » Drupal core
Version: » 8.4.x-dev
Component: Code » migration system
heddn’s picture

Priority: Critical » Major
Status: Needs work » Active

Dropping 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?

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

maxocub’s picture

Title: The "nodereference_buttons" plugin does not exist » Missing mappings for "nodereference_buttons" & "nodereference_autocomplete" widgets
Version: 8.5.x-dev » 8.6.x-dev
Issue summary: View changes
Status: Active » Needs review
Issue tags: +migrate-d6-d8
Related issues: +#2944605: [META] Check that all field widget types are mapped and tested
FileSize
6.5 KB
7.18 KB

Here's a patch and a failing test.

Beside the missing 'nodereference_buttons' mapping, there's also 'nodereference_autocomplete' that was missing.

The last submitted patch, 7: 2924570-7-test-only.patch, failed testing. View results

heddn’s picture

Assigned: Unassigned » heddn

I'll try to look at this sometime soon.

heddn’s picture

Assigned: heddn » Unassigned
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

We've got tests! We've got fixes. The fixes look complete. IS is updated. We are good to go.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/core/modules/migrate_drupal/tests/fixtures/drupal6.php
@@ -3394,11 +3460,15 @@
+  'field_company_2_nid' => NULL,
+  'field_company_3_nid' => NULL,

Do we not want to test migrating a real value too?

maxocub’s picture

There you go!

heddn’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC.

alexpott’s picture

Crediting @rkairam for finding and creating the issue and @heddn for issue triage and review.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 96a368c6c6 to 8.6.x and 71c1fb90ce to 8.5.x. Thanks!

  • alexpott committed 96a368c on 8.6.x
    Issue #2924570 by maxocub, Rajesh Kairamkonda, heddn: Missing mappings...

  • alexpott committed 71c1fb9 on 8.5.x
    Issue #2924570 by maxocub, Rajesh Kairamkonda, heddn: Missing mappings...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.