Affects Version/s: 3.4-milestone-1
Component/s: Old Core
keywords:store migration version cache clear wiki delete
Documentation in Release Notes:N/A
How to reproduce the effects:
1. Go to the WikiManager/CreateNewWiki page and create a simple (empty) wiki named 'testdoublecreation'
2. After it finishes to be created, go to WikiManager/WebHome and delete the just created wiki
3. Repeat step 1
You will see an error like:
Restart XWiki and the in-memory caches will be cleared so the subwiki can be again created.
The version check will only be null the first time the subwiki is created:
The next times it will always be found in the versionCache because the version cache is never cleared on wiki deletion:
– called by:
XWikiCacheStore.java #onEvent() <- triggered by com.xpn.xwiki.plugin.wikimanager.doc.Wiki#delete()
Maybe a solution would be to make AbstractDataMigrationManager implement EventListener and listen to WikiDeletedEvent. Then, on the event, it could set the versionCache key corresponding to the just deleted wiki to null.