Issue Bug Closed

#77972Missing upload buttons in inline field

Hendrik Putzek 09/16/16, 11:58 updated 06/15/18, 23:45

Description

If a backend field for inserting an image is configured like

<maxitems>1</maxitems>
<minitems>1</minitems>

the button to add a new relation is hidden by inline style “display:none”. (Which is correct)

But if the image is deleted by using the trashcan icon, the upload button does not show up again.

This leads to the following behaviour:
  • Its not possible to save the form (validation says there must be at least one image)
  • Its not possible to add another image and therefore make the form valid because of the missing upload button

The Buttons are hidden in typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php:247

In https://forge.typo3.org/issues/45125 is stated that:
“The buttons are not immediately
hidden/shown if the number of relation changes. That would involve
JavaScript magic and could be done in a follow up.”

That Javascript seems to be not implemented yet.

—-

Steps to reproduce:

  • Create a flexform including an inline field for inserting an image.
    Set
<maxitems>1</maxitems>
<minitems>1</minitems>
  • Upload one image and save the form
  • The upload button is hidden
  • Delete the uploaded image using the trashcan icon
  • The upload button does not show up again

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.