Someone's unpublished draft created a ghost child page - how can I find that page and remove it?

Arezou Seifpour September 8, 2022

I have a page that has a child dropdown but when I click on the dropdown, no page exists. I can recreate this situation by opening up an unpublished draft which creates a child dropdown carrot that in another browser I can see has nothing underneath it. When I delete the unpublished draft, that dropdown goes away. So how can I figure out who has an unpublished draft in my docs?

1 answer

0 votes
Andrii Maliuta
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 2022

Hello @Arezou Seifpour ,

You can try to use REST API to get the DRAFTS: 

https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-wiki-rest-api-content-get

 

ALL - https://MY_CONFLUENCE.atlassian.net/wiki/rest/api/content?status=draft

SPACE - https://MY_CONFLUENCE.atlassian.net/wiki/rest/api/content?status=draft&space=MY_SPACE

It will show the drafts and you can further extract the history/author/etc. data

 

You can use API parameters to configure the results you need.

Mia Cheeseman March 1, 2023

Has anyone translated that suggestion into English?  I have the same problem.  My categories have arrows as if there's something under them.  They should just be bulleted child pages.

Like Christopher Hopper likes this
Christopher Hopper March 9, 2023

You can see your unpublished drafts using the menu bar at the top of a Confluence page.

From the top menu bar

  1. Click on Recent to show recent pages you visited
  2. Under Recent, click on Drafts to show your recent draft pages
  3. At the bottom of that recent drafts list, click on View all drafts to show all the unpublished draft pages you have created

Unfortunately this does not show me the ghost draft page causing my Confluence menu to show an arrow instead of a disc. I have the same problem as the original post.

My solution was to recreate the page. I created a new page. I copied all the information from the old page. I then published the new page and deleted the old page that had the ghost child attached to it.

-Christopher

Matthew Scott February 8, 2024

So I've investigated this issue and fully understand what's going on here. It's 100% replicable and incredible that the development team haven't picked this up yet, because it's a major problem.

This problem occurs when somebody hits the "Create Child Page" plus button in the side panel, and then quickly clicks "Close Draft" without making any changes. Specifically, it occurs when you don't set a page title before closing the draft.

It creates a phantom page which is still recognised as a child by the parent, but is not returned in the list of children because it doesn't have a name. This causes 2 issues. The first is that the little icon next to the page title is a drop down arrow when it shouldn't be. The second is that the draft does not show up in "Recent Drafts" where you'd normally be able to retrieve it.

I wrote an integration with the API just to test this to make sure, and the API doesn't return any data relating to these phantom pages. Basically, if a page doesn't have a name, it's there as a draft but it's not visible.

This is some classic Australian programming by the looks of it. If it doesn't have a name, just filter it out 🙃

 

In order to determine what was going on, I tested a few potential fixes. First I created pages on other layers and dragged them into the page with the phantom child. Then dragged it out. I thought that might reset the icon at first. Then I tried creating new children in that same page and then deleting them after, still no good. And this essentially confirmed to me that the draft is still there, it's just not being listed (either on the web UI or in the API).

There's only one solution guys. You have to delete the page with the phantom child and recreate it. It's incredibly inconvenient when you've done a bunch of work linking it up with the rest of your wiki.

 

I'd submit a bug report but I've read a few on other issues already that were closed on reasoning along the lines of, "we're going to use our resources to make new features instead of fixing this bug, maybe we'll come back to it in a few years but we closed it so probably not." So yeah, I'm not 100% confident with my choice to use Confluence for our project right now. I hope this is the last bug I run into.

Ross Brooker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 28, 2024

Same problem, and agree exactly with the reply by @Matthew Scott 

I managed to use the API from Andrii's reply to list out all the active drafts, and judging by the ID's within the results there's a good chance my two problem pages are in there.

But there's nothing in those results that lets me actually access the drafts to do anything with them - if I plug the page ID into the standard view URL I only ever get the "We couldn't find what you're looking for" page.

Is there a URL that will instruct an API, taking a page ID as the only required parameter, that will just go ahead and delete the draft page?

Edit:
I've researched this a bit more - and that indicates trying to set the page to 'trashed' might also do the trick, but I'm wary of experimenting with URLs to call APIs in case I accidentally trash or delete swathes of my company's pages!

Christopher Hopper February 28, 2024

Matthew Scott lost me entirely when he said:

This is some classic Australian programming by the looks of it. If it doesn't have a name, just filter it out 🙃 

 

australian-programming-classic.jpeg

Matthew Scott February 28, 2024

@Christopher Hopper oh sorry, I thought since I spent all that time diagnosing the issue that I might be entitled to a joke or two. Especially when this is an issue that very likely will never be addressed. 

Like Christopher Hopper likes this
Matthew Scott February 28, 2024

@Ross Brooker your analysis is good. The problem here is that the page is technically in draft status, not trashed. When the draft doesn't have a title (as it won't when you just created the page), it is automatically filtered out of any results that it should show up in. They probably have something along the lines of 

if (page.name.length > 0) { ...show in results... } else { ...don't show... }

Obviously there'd be more checks than just that, but that'd be the condition that's causing the issue.

I wrote my own program for interfacing with the API and judging by the documentation, I'm really not sure anything would let you change it to 'trashed', because any reference to the page will just be filtered from results for the reason above. Like when you said going directly to the page gave you, "We couldn't find what you're looking for".

The developers need to remove the filter that removes pages without names from the results on all endpoints. Once they've done that, we can treat them like normal pages and remove them (even from the web interface).

Like Ross Brooker likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events