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
Issue fork feeds_tamper-3323897
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
Comment #4
megachrizComment #5
jidrone commentedI 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.
Comment #7
megachrizThank for testing and reviewing! Merged the code.