Closed (fixed)
Project:
PWA - Progressive Web App
Version:
2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2024 at 14:57 UTC
Updated:
22 Feb 2024 at 11:54 UTC
Jump to comment: Most recent
Comments
Comment #2
grevil commentedComment #3
grevil commentedI 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:
Comment #4
grevil commentedComment #6
grevil commentedThe 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.
Comment #7
grevil commentedOk, 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.
Comment #8
grevil commentedFixed! 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:Always resulted in TRUE, deleting the images on each form submit. Please review!
Comment #9
grevil commentedComment #10
anybodyComment #11
anybodyComment #13
grevil commented