- πΊπΈUnited States smustgrave
Hello this came up as a daily BSI target, since it's been a few years wonder if still experiencing this in D11?
I'm using the upload feature in an edit form.
I can successfully upload or delete an image file, but a replacement,
removing an existing file followed by an Upload with the same submit
results in the persistence of the "removed" file plus the new file
with a status code of zero (0).
Displaying the replaced file after a short time causes a wsod,
since CRON removes temporary files.
This can be reproduced by downloading the hello and common
modules here.
Applicable code is also posted in the files section.
Screen shotsin the files illustrate the issue. They are prefixed with the same step Ids (1a - 5a)
as their explanations below:
1a. Controller image with original file (Louvre 124).
1b. Original file_managed view.
2a Edit image before Removal.
2b. file_managed view before removal (same as 1b).
3a. Edit image after Removal but before Addition.
3b. file_managed view after removal but before addition (same as 1b).
3c. File directory view before submit. Only the original file (Louvre 124) is shown.
4a. Edit image after addition of new file (Louvre 132) but before the Submit action.
4b. File directory view after submit. Both files are stored.
4c. file_managed view after submit. showing new file with status=0 and the original file (louvre124).
5a. Controller image after the Submit of the Edit image showing only the new file (Louvre132).
I'm not familiar with the Drupal image system and can't be sure of the cause or offer a resolution.
Therefore I'm initially submitting it as a support request. If anyone finds a correction or a workaround, I'll use that. If the managed file works as designed, I'll change the status to a new feature request. If it's an error, I'll change the status to a bug report. Any comments are appreciated.
I'm not familiar with the Drupal image system
I added a workaround to change the status to permanent in the Controller module
of another module (asset), but the old, replaced file remains.
I also added a warning message.
Not applicable.
Not applicable.
None.
Postponed: needs info
11.0 π₯
file system
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Hello this came up as a daily BSI target, since it's been a few years wonder if still experiencing this in D11?