Change record status: 
Project: 
Introduced in branch: 
4.1.x
Introduced in version: 
4.1.0
Description: 

Description

Fixed an issue where plugin configuration changes made in submitConfigurationForm() were being overwritten by form state values. Export/Import Type entities now properly implement EntityWithPluginCollectionInterface to preserve plugin configuration.

What was broken

Previously, when a plugin modified its configuration in submitConfigurationForm(), those changes would be lost because the entity was directly saving form state values, bypassing the plugin's configuration management.

The fix

Export and Import Type entities now implement EntityWithPluginCollectionInterface, which:

  • Uses plugin collections to manage plugin instances
  • Allows plugins to control their own configuration persistence
  • Prevents form submission from overwriting plugin-modified configuration

Before (4.0.x)

// In your custom plugin's submitConfigurationForm()
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $this->configuration['processed_value'] = $this->processValue(
    $form_state->getValue('some_field')
  );
  // This configuration change would be LOST
}

After (4.1.0+)

// In your custom plugin's submitConfigurationForm()
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $this->configuration['processed_value'] = $this->processValue(
    $form_state->getValue('some_field')
  );
  // This configuration change now PERSISTS correctly
}
Impacts: 
Module developers