Hey,
I’ve been having issues removing some pages on one of our sub wikis that someone on my team created. At the time when those pages were created our Tomcat 8 had not been setup to support \ & / symbols in URLs, which I think is at the root cause of the issue(s).
Here’s what I’ve done up to now and the progress I’ve made:
-
Page were create using “/” in the name. A page was also create with “/” in the name (probably figured it would do some escape character magic?". Both cause pages that cannot be deleted.
-
I’ve since then change out Tomcat 8’s catalina.properties file to add support for both \ and /.
-
I tried accessing the pages but was still unable to do so. I made a quick velocity script to show all the pages:
{{velocity}}
#set($spaceList = $xwiki.getSpaces())
#set($num = 0)
#foreach($space in $spaceList)
#set($num = $num + 1)
#set($docuSpace = "${space}.WebHome")
#set($docu = $xwiki.getDocument($docuSpace))
* $num) isHidden = $docu.isHidden() || [[$space>>$docuSpace]]
#end
{{/velocity}}
The pages that are not accessible show up.
-
I then use some code I found a link for on this forum to delete the pages programatically since the URLs were not helpful (cannot use /delete/ method). The snippet was from @vmassol if I am not mistaken.
I was able to remove some of the pages but not all of them. -
I check again with the snippet from #3 to see the pages that remain. 3 of them show up in that list and 1 does not.
When all 4 of these are tried in the snippet mentioned in #4, they return the following The document that you’re trying to delete does not exist, nothing will be done.
The three pages that show up using my #3 snippet do not seem to show up in breadcrumbs/navigation (showhidden=true). The one that does not show up in my snippet shows up in the breadcrumbs/navigation though!
I’ve tried recreating that last one and here is what I got (already exists error message):
I’m somewhat out of ideas on what else to try for these last 4 pages. Any ideas anyone?
Sincerely,