Saving an index removes other modules’ third-party settings

Created on 1 January 2025, 2 months ago

In search_api_solr_form_search_api_index_form_alter() this module adds Solr-specific settings to the Edit Index form, under $form['third_party_settings'].

However, the submit handler which then creates the entity from the form data (\Drupal\Core\Entity\EntityForm::copyFormValuesToEntity()) will take the form values under 'third_party_settings' as the whole value of the third_party_settings property, overwriting the values from all other modules.

I think this module should add a custom submit handler to the form which takes care of this problem, adding back the values of all third-party settings that are not also present in the form.
(Alternatively, I guess you could also add all other modules’ third-party settings as '#type' => 'value' elements to the form, unless they are already there. That might also work – not sure what makes more sense.)

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇦🇹Austria drunken monkey Vienna, Austria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024