Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
11.2-rc-1
-
Unknown
-
N/A
-
N/A
-
Description
Sometimes when a page is renamed the rename can fail:
Operation logs:
Starting job of type [refactoring/rename] with identifier [refactoring/rename/1635300404353-397] Document [Home » XWiki » ORG] has been updated. Updating the document parent fields from [Home » XWiki » SERVICE] to [Home » XWiki » ORG]. Updating the back-links for document [Home » XWiki » SERVICE] in wiki [xwiki]. Updating the relative links from [Home » XWiki » ORG]. Failed to send event [org.xwiki.refactoring.event.DocumentRenamedEvent@7fc55500] to listener [org.xwiki.refactoring.internal.listener.RelativeLinkUpdaterListener@47b2a739] class java.lang.NullPointerException: null at org.xwiki.refactoring.internal.DefaultLinkRefactoring.renameLinks(DefaultLinkRefactoring.java:217) at org.xwiki.refactoring.internal.DefaultLinkRefactoring.renameLinks(DefaultLinkRefactoring.java:164) at org.xwiki.refactoring.internal.DefaultLinkRefactoring.updateRelativeLinks(DefaultLinkRefactoring.java:266) at org.xwiki.refactoring.internal.listener.RelativeLinkUpdaterListener.onEvent(RelativeLinkUpdaterListener.java:79) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:320) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:285) at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.copyOrMove(AbstractCopyOrMoveJob.java:259) at org.xwiki.refactoring.internal.job.MoveJob.performRefactoring(MoveJob.java:107) at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.maybePerformRefactoring(AbstractCopyOrMoveJob.java:212) at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:153) at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:125) at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:101) at org.xwiki.refactoring.internal.job.RenameJob.process(RenameJob.java:50) at org.xwiki.refactoring.internal.job.AbstractEntityJobWithChecks.runInternal(AbstractEntityJobWithChecks.java:65) at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.runInternal(AbstractCopyOrMoveJob.java:57) at org.xwiki.refactoring.internal.job.MoveJob.runInternal(MoveJob.java:68) at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243) at org.xwiki.job.AbstractJob.run(AbstractJob.java:220) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Finished job of type [refactoring/rename] with identifier [refactoring/rename/1635300404353-397]
Seems that xobject can be null and it's not checked here before calling renameLinks:
https://github.com/xwiki/xwiki-platform/blob/stable-12.10.x/xwiki-platform-core/xwiki-platform-refactoring/xwiki-platform-refactoring-default/src/main/java/org/xwiki/refactoring/internal/DefaultLinkRefactoring.java#L164
Attachments
Issue Links
- is caused by
-
XWIKI-981 Updating links when renaming a document should include wiki content inside TextArea xobject properties
- Closed