Unable to remove version. At least once referenced...

41 views
Skip to first unread message

Paul

unread,
Jun 9, 2025, 2:50:16 PMJun 9
to Magnolia User Mailing List
Something is wrong with my version history in website workspace. Is there any way to delete all versions? Something like hard reset. I need this for website and other custom workspaces. I would appreciate a step by step guide.

ERROR info.magnolia.cms.core.version.BaseVersionManager : Failed to limit version history to the maximum configured javax.jcr.ReferentialIntegrityException: Unable to remove version. At least once referenced. at org.apache.jackrabbit.core.version.InternalVersionHistoryImpl.removeVersion(InternalVersionHistoryImpl.java:412) ~[jackrabbit-core-2.20.15.jar:2.20.15]


Adam Siska

unread,
Jun 10, 2025, 3:10:52 AMJun 10
to Magnolia User Mailing List, Paul

Hi Paul,
we have this DOCu page for recovering from inconsistency of versioned nodes. Not sure if it covers your use case, but worth to try: https://docs.magnolia-cms.com/product-docs/6.3/administration/troubleshooting/broken-version-history/
If it doesn't help, would be nice if you provide some reproduction steps for how you reached that error.

Regards,
Adam

Paul

unread,
Jun 11, 2025, 6:53:34 AMJun 11
to Magnolia User Mailing List, Adam Siska, Paul

Hi Adam,

Thanks for your response. I had actually already tried the solution from the documentation you mentioned, and I also tried the Version Cleaner module — unfortunately, neither worked for me.

Here’s the context: Magnolia 6.2, with /server/version@active = true and /server/version@maxVersionIndex = 10. When I try to publish a page via the Pages app, I get the following error in the Docker log:

ERROR info.magnolia.cms.core.version.BaseVersionManager : Failed to limit version history to the maximum configured javax.jcr.ReferentialIntegrityException: Unable to remove version. At least once referenced;

I’ve noticed that despite the error, the page does get published, but Magnolia doesn't respect the version limit — currently, there are more than 10 versions created.

When I set /server/version@active = false, the error naturally disappears. I suspect this is due to an incorrect initial configuration of File Storage in our setup, and that we might have some inconsistencies in the JCR.

I believe the best solution would be to completely remove the version history — but I’m not sure how to safely do that.

Adam Siska

unread,
Jun 12, 2025, 2:05:47 AMJun 12
to Magnolia User Mailing List, Paul, Adam Siska

Hi Paul,

Based on your description, it seems likely that there's a misconfiguration in your storage setup. Not sure if deleting the versions might address the root cause of the problem. To remove versions, you can use the BaseVersionManager directly, there is removeVersionHistory(Node node) method, which can be called from a Groovy script, for example. Maybe you can try to temporarily raise the max version limit.

For further investigation, it would be helpful to have the full stack trace of the error. That would give us better insight into what’s happening in your specific use case.

Best regards,
Adam

Reply all
Reply to author
Forward
0 new messages