There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-a181006f-f8ca-48f8-b7da-34e91956221b XWIKI-23478 Open

Calling services.wysiwyg.fromAnnotatedXHTML from jobMacro crash with npe

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-e41c71de-4e71-42d5-b756-4478f6eeac3f slauriere on 22/Aug/25 16:51
 

Adding one observation:

In DefaultTemporaryAttachmentSessionsManager, the session retrieved from the XWikiRequest is null, despite the fact that the current XWikiRequest is cloned by the JobMacro, by XWikiContextCopier, in the following statement:

clonedXWikiContext.setRequest(this.xwikiRequestCloner.copy(originalXWikiContext.getRequest()));

However, when setting a breakpoint on XWikiContextCopier#L81 and evaluating expressions originalXWikiContext.getRequest().getSession() and clonedXWikiContext.getRequest().getSession(), I noticed that the former returns an object as expected, but not the latter. Which means the JobMacro does not copy the session, which could be a bug of the JobMacro.