Is there a way to delete a page without going to the page?
Asked by Jason Plumhoff:

I was playing around the JIRA issues macro when I somehow created an error. Every time I go to the page with the macro, I get the "System Error" page instead. I don't really need the macro and I don't have time to troubleshoot it right now, so I'd rather just get rid of the offending page. But I can't seem to find a way to remove it without going to the page itself - which just gives me the error message. Any ideas?

Thanks,

Jason


Answers:
author: Mirek
body: Hi Jason,

You do not need to remove the page..

You can try to figure out page ID .. go direcly to page history (Tools \> Page History) on any working page and using link like that will appear on the top

<http://yourconfluence/pages/viewpreviousversions.action?pageId=1234567>

change the page ID at the end to the one that is not working and restore to the version that you know that was ok..

I hope that will help

Regards,

Mirek

comments: author: Jason Plumhoff
body: This sounds perfect! My only problem now is how can I get the page id when I can't actually go to the page? I'm comfortable navigating through the database if need be - I just need to know where to look.

Thanks,

Jason


author: Mirek
body: Hi Jason,

There is a few ways of doing that without accessing the database.. I can describe few different and maybe you can use one of them.. I not we can try more options :) ..

First..

If this page was recently updated you can go to the space were the page is choose Browse and Pages.. If you will look at Recently Updated then you will notice a list of pages with titles and a link (view change).. Hower over this link and you should notice the page ID in the URL.. More! If you will click on this link you will see not only what is the different from the previous version but there should be also a link to Page History! This is a thing that you are looking for.. At least on Confluence 4.2 :)

<br />

Second..

If the above method will not work or you will not see the page on Recently Updated section you can use Firebug or other tool like that build in your browser and monitor for GET reqests and responses from the console when trying to view the page. This sounds like more complex method but it is working fine for me.. I am always finding the correct information that I am looking for..

But if from some reason you are not able to find it in that way..

Third..

If you have access to the log files.. You try to view the page and look what error you are recieving. It should contain information about ID of the page that was not found

I hope that one of the above way will work.. If not please add a comment and we will look for other solutions :)

Regards,

Mirek


author: Jason Plumhoff
body: Mirek - Option 1 worked perfectly! I was able to use the pageID and revert it to a working version. Your tips are definitely going into my "Handy Tricks" book!

Thanks,

Jason


author: Shreya Rawal
body: I found an easier way of doing this in case anyone else is looking for it. Create a new Dummy page under the same space and using Page Reorder under Content Tools move the page to be deleted under the newly created Dummy page. Delete the Dummy page and the child page.


author: CharlesH
body: If you have the Reporting plugin then this can help produce a table listing child pages with li ks to edit or remove each page without needing to visit that page. See the code I shared in this topic: <https://answers.atlassian.com/questions/58146/there-is-a-macro-that-receives-the-id-of-a-page-and-display-the-button-to-add-to-favorites-and-to-watch-the-page?page=1>


author: Sandro Herrmann [Communardo]
body: You can try the direct call to the remove action:

<http://yousystem/confluence/pages/doremovepage.action?pageId=thepageid>

comments: author: Jim Romaine
body: Needed this today, thanks! Had to include Mirek's first option to get the pageid as its not readily available to a page that won't open.


author: Matthew J. Horn
body: If you're comfortable with directly accessing the database, find the page ID and remove it from the CONTENT and BODYCONTENT tables.