- Issue created by @Grevil
- 🇩🇪Germany Grevil
I can not directly reproduce the issue in my dev environment, but I get an error, that the uploaded file isn't referenced anywhere, which leads to not being able to save the configuration at all:
The file used in the Upload image field may not be referenced.
- Merge request !93Issue #3419797: Saving a configuration, while having a custom logo uploaded in the Icon field will break the logo → (Merged) created by Grevil
- last update
10 months ago 11 pass - 🇩🇪Germany Grevil
The provided MR fixes the issue, but the fake file usage feels filthy...
Unsure how to proceed from here. @Anybody, what do you suggest? The error triggers in line 443 of "/core/modules/file/src/Element/ManagedFile.php" and completely prevents the form submition, so we have to find a fix here.
- 🇩🇪Germany Grevil
Ok, great now I can replicate the original issue in my dev environment.
Setting this to "Major", as not only the image preview will be removed, but furthermore the manifest.json won't be using the uploaded image anymore, but instead uses the fallback image provided with the module.
- Assigned to Anybody
- Status changed to Needs review
10 months ago 10:05am 8 February 2024 - 🇩🇪Germany Grevil
Fixed! The problem was, that
$form_state->getValue('image_fid')
returned an id string and$config->get('image_fid')
a number, meaning this if case here:// If a new image is uploaded, we need to delete the old ones: if ($config->get('image_fid') !== $imageId) { $this->manifest->deleteImages(); }
Always resulted in TRUE, deleting the images on each form submit. Please review!
- Issue was unassigned.
- Status changed to RTBC
10 months ago 11:43am 8 February 2024 - Status changed to Fixed
10 months ago 11:54am 8 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.