Problem/Motivation

When saving configuration for a Tamper plugin, Feeds Tamper doesn't call submitConfiguration() on it. Instead the configuration values are fetched directly from the form state, see this code from TamperFormBase:

$plugin_config = $form_state->getValue(self::VAR_PLUGIN_CONFIGURATION);
if ($plugin_config) {
  $config += $plugin_config;
}

For some Tamper plugins this causes issues and the config doesn't get saved in the right way. For example, this is an issue with the ConvertBoolean plugin as reported in #3280233: Tamper: "Convert to Boolean" If No Match.

Steps to reproduce

Proposed resolution

Make sure that submitConfigurationForm() gets called and add a test that ensures that it happens.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

MegaChriz created an issue. See original summary.

megachriz’s picture

Status: Active » Needs review
jidrone’s picture

Status: Needs review » Reviewed & tested by the community

I found this trying to debug a custom plugin, the patch is working fine, the code looks great and not errors when saving plugin configuration.

Thank you.

  • MegaChriz committed fc2e799 on 8.x-2.x
    Issue #3323897 by MegaChriz, jidrone: Added missing...
megachriz’s picture

Status: Reviewed & tested by the community » Fixed

Thank for testing and reviewing! Merged the code.

Status: Fixed » Closed (fixed)

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