Problem/Motivation

Scenario:

  • Admin is editing an existing feature.
  • New configuration is assigned by the assignment plugins.
  • Admin doesn't want that configuration to be packaged, so unchecks it and regenerates the feature.
  • Admin brings the feature up again for editing. Expected result: the removed items are not automatically assigned. Actual result: there they are again.

Relevant code section:

            // Save which dependencies are specifically excluded from
            // auto-detection.
            if (($section == 'detected') && ($default_value === FALSE)) {
              // If this was previously required, we don't need to set it as
              // excluded because it wasn't automatically assigned.
              if (isset($this->required[$component][$key])) {
                unset($this->required[$component][$key]);
              }
              else {
                $this->excluded[$component][$key] = $key;
              }
              // Remove excluded item from export.
              if ($component == 'dependencies') {
                unset($export['dependencies'][$key]);
              }
              else {
                unset($export['config'][$config_name]);
              }
            }

There is a parallel section for handling the 'required' constraint. The problem may be that these assignments are handled in the form generation code. So this bug may be solved by #2597850: Constraints (excluded and required) should be added when modifying a feature through Drush.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

nedjo created an issue. See original summary.

nedjo’s picture

Status: Active » Postponed