There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-97b0c5a2-c1d6-467b-8cfe-d14d44701143 XWIKI-24720 Open

ImageStyleIT#imageStyleAdministration is flickering

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-0ffc3081-c096-47a3-bd18-785aa3618d3a Vincent Massol on 15/Sep/26 10:42
 

The diagnostic added to ImageStyleAdministrationPage fired for the first time on stable-18.8.x build 3, on the wiki1 run (imageStyleAdministration[2]; the main wiki run passed): https://ci.xwiki.org/job/XWiki%20Environment%20Tests/job/xwiki-platform/job/stable-18.8.x/3/testReport/

It failed on the first visit to the section, 6 seconds into the test, at ImageStyleIT.java:82, before the test does anything. So this is not a wait or a navigation race.

The section as the server rendered it:

<label for="Image.Style.Code.ConfigurationClass_0_defaultStyle">
  $escapetool.xml($property.translatedPrettyName)
</label>
<dd></dd>

The same document as REST served it a few seconds later:

className: Image.Style.Code.ConfigurationClass, number 0, pageVersion 3.1
className: XWiki.ConfigurableClass, number 0

So the xobject is there. Both requests read that document through the same document cache entry and nothing saves it in between, and the xobject's XClass reference is stored relative and resolved against the document's own reference in BaseCollection#getXClassReference(), so it cannot be keyed against the wrong wiki either. A document returned without its xobjects, which is what XWIKI-24778 describes, is therefore ruled out for this failure.

What is empty is the XClass: Image.Style.Code.ConfigurationClass is read as if it had no properties, so $configurationClass.get('defaultStyle') is null, which leaks the two raw Velocity labels, and XWikiDocument#display returns an empty string, which is the empty <dd>.

One fork is left: whether that empty XClass is a persistent state of the cached document or only affects the request that renders the section. The diagnostic now also dumps /rest/wikis/<wiki>/classes/Image.Style.Code.ConfigurationClass on failure. A class served by REST without its properties means the cached document is poisoned; a class served with them means the breakage is scoped to the rendering request.