Thursday, March 8, 2012

Page Unavailable, Can't Edit or Delete

This week I selected a page link in Confluence and received a server error. I could not view, edit or delete the page. I thought if I knew the page ID, I might be able to enter the appropriate edit URL. But I didn't know the page ID.

I looked around on the Internet and found Jeremy Largman's user macro, but I couldn't edit the page to add the macro. Finally, I found the correct procedures from Atlassian: Editing or Deleting a Page That Won't Render.

Page ID
Ultimately, I had to ask our admin to retrieve the page ID from the database. He was able to do so by running the following command against the database:
select contentid from CONTENT where title = '<page_name>' and version = '1';

Edit URL
Once I had the page ID, I entered a URL similar to the following in my browser's address bar:
http:///pages/editpage.action?pageId=<page_ID>
Other edit options include pressing the Ctrl + e keys or accessing the edit URL that includes the page name. For example:
http:///pages/editpage.action?spaceKey=<space_key>&title=<page_name>

Delete URL
To delete the page, try:
http://<base_url>/pages/removepage.action?pageId=<page_ID>

Other Commands

Here are some other commands that may be useful.

Edit blog post:
http://<base_url>/pages/editblogpost.action?pageId=<page_ID>
 
View attachment:
http://<base_url>/pages/viewpageattachments.action?pageId=<page_ID>
 
Delete attachment:
http://<base_url>/pages/removeattachment.action?pageId=32787&fileName=harbour.jpg&version=1
 
Retrieve wiki markup from database:
select body from bodycontent where contentid in (select contentid from CONTENT where title = '<page_name>');

No comments:

Post a Comment