Hi,
Our code using PageManager#deepCopyPage
stopped working on Confluence 7.17.1. Here’s a minimal working example that produces the error:
com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate = …
long contentId = …
transactionTemplate.execute(() -> {
Page originalPage = pageManager.getPage(contentId);
Page destinationPage = originalPage.getParent();
PageCopyOptions options = new PageCopyOptions.Builder()
.withPrefixNameConflictResolver(true, ThreadLocalRandom.current().nextInt(0, Integer.MAX_VALUE) + "-")
.withProgressMeter(new ProgressMeter())
.withUser(AuthenticatedUserThreadLocal.get())
.build();
pageManager.deepCopyPage(options, originalPage, destinationPage);
return null;
})
The error is (full stacktrace + preceding log entries attached):
java.lang.IllegalStateException: Transaction not successfully started
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:63)
…
deepcopypage-mwe-log.txt (41.3 KB)
Is this a bug? Any help would be appreciated.
Maximilian