Managed Files. Non-Null Default values in edit forms sometimes lack resize messages and Remove Buttons.

Created on 3 May 2022, over 2 years ago
Updated 17 June 2024, 3 months ago

Problem/Motivation

Managed Files. Non-Null Default values in edit forms sometimes lack resize messages and Remove Buttons. The saved files also feature a status code of zero and therefore deleted by Cron.

1. "PetListBeforeSubmit" attachment, below, shows the list before editing with a blank pet_photo_id.
2. "EditBeforeSubmit" shows the form edit with a selected image without resize messages or remove button.
3. "PetListAfterSubmit" shows the list without the pet_photo_id, no change from before submit.
4. "fileValidateImageResolutionWarning" shows:
"Warning: Trying to access array offset on value of type null in Drupal\pet\Form\PetEditForm->buildForm() (line 201 of
/var/www/html/drupal/modules/custom/pet/src/Form/PetEditForm.php)"
5. "FileMgdEditImageAfterSubmit" shows the file_managed table extract in MariaDB. Note the file code
of zero.
6. "FileAddedAfterSubmit" shows the added file itself ('Octopus2',bottom) which would be deleted by cron.
7. "FormEditPetPhotoId" shows the $form entry. Note the non-Null default value:[$row['pet_photo_id']].

This problem is intermittent. Running under Ubuntu Server, above, features this anomaly. But running
Ubuntu under Windows Linux does not appear to.

8. "HelloEditImageWithNotificatioins". shows an image with resize messages and Remove Button.
9. "FormEditHelloGreetingPic". shows its $form entry. I don't see a substantive difference between it and item 7.,
but I could be wrong.

I'm submitting this entry initially as a support request. If no problem is found I'll resubmit
as a bug.

Many thanks for your attention.

Steps to reproduce

Create a managed file entry like item 7 or 9 above, with and without a non-null default. Note, the non-null default value is an array.

Proposed resolution

An analysis of the error message, item 4, above could provide information

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
FormΒ  β†’

Last updated less than a minute ago

Created by

πŸ‡ΊπŸ‡ΈUnited States othdvlpr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    This issue was triaged as part of BSI.

    Considering #4, comments in the IS about this being intermittent, and that there have been no other comments on this issue since, I am going to close this as outdated.

    @othdvlpr if you are still having issues, please reopen with a clear description of the bug and how to reproduce it from a fresh Drupal installation.

    Thanks!

Production build 0.71.5 2024