Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
14.8
-
None
-
Unknown
-
Description
When using the attachmentSelector macro with savemode set to "default" (i.e., the attachment selection changes are not persisted right away, but when the form is saved), if several attachments already exist for the current document, selecting a new one using the modal will not update the right pane.
Reproduction steps:
- Create a TestSpace.TestClass XClass with a property named field of type String
- Create a Sheet with the following content {{attachmentSelector classname="TestSpace.TestClass" property="field" displayImage="true"/}}
- Link the sheet to TestSpace.TestClass by adding a XWiki.ClassSheetBinding XObject
- Create a page and add a TestSpace.TestClass XObject
- Edit the new page. At this "Choose an attachment" button should be visible
- Click on the green check at the top right of one of the attachment
- The image is updated and the modal is closed
- re-click on "Choose an attachment"
Expected result:
The Add section at the left of the modal is updated with the previously selected attachment
Actual result:
The Add section is not updated and either:
- stays empty if no attachment was selected previously
- keeps displaying Replace XXX where XXX is the filename of the initially selected attachment