Details
-
Bug
-
Resolution: Unresolved
-
Major
-
14.6-rc-1
-
Unknown
-
Description
Steps to reproduce
- Open the Attachments tab of a page
- Upload several files at once (or have someone else add an attachment to the page) so that an attachment is saved while the attachments table is being refreshed
Expected
The attachments table lists the attachments correctly and nothing is logged.
Actual
The refresh of the attachments table can return a broken row (empty file name, size, date, author, actions), and the following errors are logged:
ERROR o.a.v.rendering - Left side ($sz) of comparison operation has null value at <unknown template>[line 1402, column 10] ERROR o.a.v.rendering - Left side ($ksz) of comparison operation has null value at <unknown template>[line 1407, column 11]
Cause
flamingo/attachmentsjson.vm lists the attachments of the page with a query on the database, then builds each row from $doc.getAttachment($attachmentReference.name), $doc being the document loaded at the beginning of the request. An attachment saved in between is returned by the query but not found in $doc, so the row is built from a null attachment, and #dynamicsize (from macros.vm) is called with a null size.
This is visible on CI with LightboxIT#playSlideshow (image-lightbox functional tests), which uploads two images in a row through the attachments pane.
Attachments
Issue Links
- relates to
-
XWIKI-14807 The attachments tab does not take into account the document revision
-
- Closed
-
-
XWIKI-13454 Add pagination for Attachments
-
- Closed
-