Closed (fixed)
Project:
Feeds Tamper
Version:
8.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
26 Nov 2022 at 15:01 UTC
Updated:
14 Dec 2022 at 18:44 UTC
Jump to comment: Most recent
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.
Make sure that submitConfigurationForm() gets called and add a test that ensures that it happens.
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.