There are 4 updates, 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-0aa75d0a-24b1-4d59-a2db-7f821f8d0623 XWIKI-22931 Open

The edit action modify the cached document when creating a page from template

 
View issue   ยท   Add comment
 

4 updates

 
cid:jira-generated-image-avatar-daf06ebb-649d-4f2f-8e3c-7dbae7d225cf Changes by Thomas Mortagne on 25/Feb/25 17:33
 
Fix Version: 16.10.5
Fix Version: 17.2.0-rc-1
Description: To reproduce: execute org.xwiki.administration.test.ui.PageTemplatesIT#createPagesFromTemplate UI test.

Getting the following warning:

{noformat}
2025-02-25 15:49:50,629 [qtp1663619914-217 - http://host.testcontainers.internal:8080/xwiki/bin/edit/PageTemplatesIT/createPagesFromTemplate/TestTemplateInstance/WebHome?template=PageTemplatesIT.createPagesFromTemplate.TestTemplate&parent=PageTemplatesIT.createPagesFromTemplate.TestTemplateProvider&title=TestTemplateInstance&form_token=mCcjbaFsfjhDFkObEJOBeg] WARN  c.x.x.d.XWikiDocument          - Abusive modification of the cached document [xwiki:PageTemplatesIT.createPagesFromTemplate.TestTemplate()]  
java.lang.IllegalStateException: Abusive modification of the cached document
  at com.xpn.xwiki.doc.XWikiDocument.setMetaDataDirty(XWikiDocument.java:2436)
  at com.xpn.xwiki.doc.XWikiAttachmentContent.setContentDirty(XWikiAttachmentContent.java:233)
  at com.xpn.xwiki.doc.XWikiDocument.copyAttachment(XWikiDocument.java:4792)
  at com.xpn.xwiki.doc.XWikiDocument.copyAttachments(XWikiDocument.java:4759)
  at com.xpn.xwiki.doc.XWikiDocument.readFromTemplate(XWikiDocument.java:4551)
  at com.xpn.xwiki.web.XWikiAction.readFromTemplate(XWikiAction.java:1266)
  at com.xpn.xwiki.web.EditAction.prepareEditedDocument(EditAction.java:128)
  at com.xpn.xwiki.web.EditAction.render(EditAction.java:83)
  at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:636)
  at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:338)
...
{noformat}
Assignee: Thomas Mortagne
 
 

2 comments

 
cid:jira-generated-image-avatar-daf06ebb-649d-4f2f-8e3c-7dbae7d225cf Thomas Mortagne on 25/Feb/25 17:34
 

That error actually does not make much sense to me (the XWikiContext document is supposed to be a cloned document and not a document from the cache) and I cannot reproduce it in a more standard instance (even when executing the test with that instance).

 
cid:jira-generated-image-avatar-daf06ebb-649d-4f2f-8e3c-7dbae7d225cf Thomas Mortagne on 25/Feb/25 17:35
 
That error actually does not make much sense to me (the XWikiContext document is supposed to be a cloned document and not a document from the cache) , and I cannot reproduce it in a more standard instance (even when executing the test with that instance).