- Issue created by @Sana.Neyazi
- 🇮🇳India Sana.Neyazi
This issue is only happening with Drupal core 10.2 and it is working fine with Drupal 10.0, do we have any patch for this issue?
- Assigned to sourabhjain
- Status changed to Needs work
4 months ago 2:57pm 16 February 2024 - 🇮🇳India sourabhjain
I am able to replicate the issue.
Let me try to work on this.
- 🇺🇸United States DamienMcKenna NH, USA
DamienMcKenna → changed the visibility of the branch 3421309-unable-to-save to hidden.
- Status changed to Needs review
4 months ago 11:50am 7 March 2024 - last update
4 months ago 10 pass, 2 fail - 🇺🇸United States DamienMcKenna NH, USA
The problem is the validation on the modify_http_headers field, if that's removed the form can save correctly.
This patch is a bandaid that lets the settings form save, but it needs a proper fix that uses the correct validation logic.
- 🇺🇸United States capellic Austin, Texas
Thank you @DamienMcKenna for this patch and all that you do! The patch works for me!
- Issue was unassigned.
- 🇧🇾Belarus gun_dose
The reason of this error is that module settings form uses ListItemBase::validateAllowedValues method as validation callback. But at the last versions of Drupal allowed values form of list fields was totally refactored. See this core commit https://git.drupalcode.org/project/drupal/-/commit/693ced9cd830f9b1d0942...
So to fix thie we need to either refactor module settings form to use the same approach as list fileds or copy the old validation callback to SettingsForm class. Unfortunately I can't do this because on my current froject we don't use headers settings, and in my case patch from #7 solved my problem - 🇺🇸United States johnpicozzi Providence, RI
I can confirm the patch from #7 resolves the issue, but we will need a long term fix to add the validation correctly. Going to get this issue some attention as this module was a module of the week on Talking Drupal. Thanks All!