- Issue created by @omarlopesino
- Merge request !37Issue #3491004: Can't save image widget crop settings in Drupal 11 โ (Merged) created by omarlopesino
- ๐ช๐ธSpain omarlopesino
I've created a MR that fixes the problem. Please review, thanks!
- ๐ช๐ธSpain omarlopesino
omarlopesino โ changed the visibility of the branch 8.x-2.x to hidden.
- ๐ซ๐ทFrance mably
Hit by the same problem, can confirm that the contributed patch fixes the problem, thanks!
- ๐บ๐ธUnited States joegraduate Arizona, USA
Closed ๐ ImmutableConfigException Active as a duplicate of this issue. Ideally this should be fixed in 3.0.x-dev first but also backported to 8.x-2.x. @sweetchuck contributed to the closed issue and should also be credited here.
- Status changed to RTBC
7 months ago 5:15pm 6 February 2025 - ๐ซ๐ทFrance webmestre
Hello,
the 3.0.x-dev version also produces:Drupal\Core\Config\ImmutableConfigException: Can not set values on immutable configuration image_widget_crop.settings:settings.library_url. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object in Drupal\Core\Config\ImmutableConfig->set() (line 27 of core/lib/Drupal/Core/Config/ImmutableConfig.php).
I'm using the 11.1.2 Drupal version
- ๐บ๐ธUnited States joegraduate Arizona, USA
Increasing priority to major since it is impossible to save module config currently.
- ๐บ๐ธUnited States natefollmer
Path issue with previous patch that caused patching to fail. I've fixed the paths. This one should work. I can now save settings after applying this patch.
- ๐ฎ๐ณIndia anup.singh
anup.singh โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia anup.singh
Latest patch are working and it seems to be correct approach, So update the MR with same.
- First commit to issue fork.
- ๐จ๐ฆCanada joelpittet Vancouver
Just ran into this, thanks for putting this together, hopefully this can be merged soon.
- ๐บ๐ธUnited States jesss
The MR works for me. I hope this gets merged soon -- this module is unusable without it.
- ๐บ๐ธUnited States phenaproxima Massachusetts
I'm going to merge this to get people unblocked, even though the bug itself is due to preexisting incorrect pattern -- you are never supposed to inject a config object into a form (or any class) as a dependency.
The correct pattern would be for the form to override the
getEditableConfigNames()
method, and use$this->config()
internally to load config. Core will guarantee that it gets editable versions of anything listed ingetEditableConfigNames()
.Merging this on the good-faith assumption that some kindly person will open a follow-up issue in which to do that cleanup.
- ๐บ๐ธUnited States phenaproxima Massachusetts
The merge train has now left the station! Should be committed shortly when all tests pass.
Now that this issue is closed, please review the contribution record.
As a contributor, attribute any organization helped you, or if you volunteered your own time.
Maintainers, please credit people who helped resolve this issue.
-
phenaproxima โ
committed a0c244a2 on 3.0.x authored by
omarlopesino โ
[#3491004] fix: Can't save image widget crop settings (...
-
phenaproxima โ
committed a0c244a2 on 3.0.x authored by
omarlopesino โ
- ๐จ๐ฆCanada joelpittet Vancouver
Thanks a bunch @phenaproxima created that follow-up ๐ Refactor form to use getEditableConfigNames() and $this->config() instead of injecting config Active