Problem/Motivation

While working on #2620364: Variable to config: theme settings [d7] I discovered that the get plugin fails when a previous plugin returns multiple true.

The part of the process pipeline with the problem is the conversion of the D7 theme setting name to the D8 configuration name. Seemed simple enough but it doesn't work.

process:
  # build the configuration name from the variable name, i.e.
  # theme_bartik_settings becomes bartik.settings
  configuration_name:
    -
      plugin: explode
      source: name
      delimiter: _
    -
      plugin: extract
      index:
        - 1
    -
      plugin: concat
      source:
        -
        - constants/config_suffix

This pipeline works if both extract and get use 'handle_multiples = TRUE'. Note that #2500495: Upgrade path for Color 7.x uses this same pattern.

Data model changes

Proposed resolution

Add 'handles_multiples = TRUE' to the Get annotation.

Remaining tasks

User interface changes

N/A

API changes

Comments

quietone created an issue. See original summary.

swentel’s picture

Status: Active » Closed (duplicate)
quietone’s picture

Status: Closed (duplicate) » Active

Reopening, because this issue about the Get plugin and the other is about the Extract plugin. They are different and need to be considered individually, especially 'Get' which is used in every process pipeline.

swentel’s picture

ow, sorry about that, they looked really similar, will read better next time :)

quietone’s picture

Title: Set handle_multiples true in Get process plugin » Pipeline using explode and concat fails

Hopefully, a more informative title.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

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

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

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

mikeryan’s picture

Issue tags: +Needs tests
mikeryan’s picture

Status: Active » Closed (duplicate)

Great, thanks!