This issue has been created
 
 
Book Versions / cid:jira-generated-image-avatar-fef7b09d-d46e-47e1-88af-98f49e94fc02 BVERSION-149 Open

Exception when updatingg pinned pages upon publication

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-25eb41f2-d9f8-471a-8e48-7907548a0eda Clément Aubin created this issue on 13/Feb/25 09:25
 
Summary: Exception when updatingg pinned pages upon publication
Issue Type: cid:jira-generated-image-avatar-fef7b09d-d46e-47e1-88af-98f49e94fc02 Bug
Assignee: Unassigned
Attachments: Test+Book.WebHome.xar
Created: 13/Feb/25 09:25
Priority: cid:jira-generated-image-static-major-21c7b6e9-ed4c-4a47-8dd2-86e07963dc18 Major
Reporter: Clément Aubin
Description:

When publishing the following space, I'm hitting the following stack trace in the logs :

Updating pinned pages
The old reference [Space sub:Test Book] does not belong to the parents chain of the reference [Wiki xwiki]
class java.lang.IllegalArgumentException: The old reference [Space sub:Test Book] does not belong to the parents chain of the reference [Wiki xwiki]
    at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:126)
    at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:132)
    at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:132)
    at org.xwiki.model.reference.AbstractLocalizedEntityReference.<init>(AbstractLocalizedEntityReference.java:139)
    at org.xwiki.model.reference.DocumentReference.<init>(DocumentReference.java:87)
    at org.xwiki.model.reference.DocumentReference.replaceParent(DocumentReference.java:336)
    at wiki:sub//org.xwiki.contrib.bookversions.internal.DefaultBookVersionsManager.getPublishedReference(DefaultBookVersionsManager.java:2319)
    at wiki:sub//org.xwiki.contrib.bookversions.internal.DefaultBookVersionsManager.copyPinnedPagesInfo(DefaultBookVersionsManager.java:2580)
    at wiki:sub//org.xwiki.contrib.bookversions.internal.DefaultBookVersionsManager.publishInternal(DefaultBookVersionsManager.java:1921)
    at wiki:sub//org.xwiki.contrib.bookversions.internal.PublicationJob.runInternal(PublicationJob.java:84)
    at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246)
    at org.xwiki.job.AbstractJob.run(AbstractJob.java:223)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)

The test book I'm using is located in the sub-wiki sub. I'm attaching the XAR of this book to this issue.