Cleaning up subwikis after deleting their databases

Hi,

Is there a way to make XWiki completely forget a subwiki if its database has been manually deleted from the RDMS?

When deleting the database of a subwiki, the subwiki still appears in the list of wikis, and the extension manager still tries to update extensions in the subwiki / check compatibility of extension (updates) in the main wiki for instance. Maybe there are other places where the subwiki still being there causes issues.

The delete button in the wiki manager does not work in this case, it produces errors.

Would a "create database “subwiki”; help?

(of course I know one should not delete a database like this, but I would like to know if there is a way to rescue such an XWiki instance and be reasonably sure that the instance can be considered clean, or if it would be better to start again from scratch / it would take meticulous work to fix)

Follow up question: should the wiki manager handle the case? Could it notice the database is not there anymore and go on to clean the other things up?

It’s not really clear to me what you want. If the goal is cleanup then IMO we should simply make delete work (AFAIK the old wiki manager used to support this use case, indicating that the database could not be found and asking if the user wanted to force the delete).

That being said all this delete would do is remove the wiki descriptor which you can already do very easily since the wiki descriptor is a wiki page.

Ok, so this is simply a question of removing the wiki descriptor page. Thanks!

For posterity, if you created the “elephant” subwiki, its wiki descriptor page is by default at: http://localhost:8080/xwiki/bin/view/XWiki/XWikiServerElephant (mind the upper case first letter)

Note that the doc is at Accessing a wiki (XWiki.org)

It’s also linked from the wiki index.

Yep. The edit button next to the wiki to clean up. Thanks!