[~Lucas C] are you sure this cannot be reproduced anymore?
from what I see in the code, the function that handles the removal of xwikispace entry is the one from https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java#L1272 , which ends up calling this one https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java#L869 for counting the children pages of a given space reference to know whether it should be cleaned up or not. The query from this last hasDocuments() function still seems fragile, I don't see any handling of special characters in the space name there, so the problem should still reproduce. Maybe the database engine on which you tested has some different behaviour wrt like wild wildcard chars? Or maybe we fixed something in the display of the tree itself (so that the issue is no longer visible to the end user), but the underlying problem that the xwikispace table is not properly kept in sync still exists...
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.