This issue has been created
There are 3 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-bf5ebbfc-200c-493b-ab60-da00235fc1ff XWIKI-25217 Open

The attachments table can return a broken row and log errors when an attachment is added while it is being refreshed

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-610844b7-a9fd-458e-a4c7-9cd15ecbb4a8 Simon Urli created this issue on 08/Oct/26 15:14
 
Summary: The attachments table can return a broken row and log errors when an attachment is added while it is being refreshed
Issue Type: cid:jira-generated-image-avatar-bf5ebbfc-200c-493b-ab60-da00235fc1ff Bug
Affects Versions: 14.6-rc-1
Assignee: Unassigned
Components: Attachments
Created: 08/Oct/26 15:14
Priority: cid:jira-generated-image-static-major-cd20be33-137d-4841-931e-cb3872edfb49 Major
Reporter: Simon Urli
Description:

Steps to reproduce

  1. Open the Attachments tab of a page
  2. 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.

 
 

3 updates

 
cid:jira-generated-image-avatar-610844b7-a9fd-458e-a4c7-9cd15ecbb4a8 Changes by Simon Urli on 08/Oct/26 15:14
 
Fix Version: 18.9.0-rc-1
Assignee: Simon Urli
Labels: bugfixingday