Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need DB query to get pages without parents

Matt Donagan August 5, 2022

We recently had an issue where a page had no parent page and it was not showing on the sidebar, although the page was directly accessible. I fixed the issue by "moving" the page and listing the correct parent during the move.

I would like to query the database (Postgres) to see how many other pages do not have a parent page listed, in order to see if we have other pages with the same issue.

I need help with that query.

Thank you

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
August 6, 2022

The database is not a good way to do this, you'd have to go digging through several different tables, making negative searches (you're actually looking for a record that isn't there, so you'd actually need to be searching for every parent-child relationship and then subtracting that from a list of pages, and then working out which ones of those are root pages and which are orphans)

It is far easier to go to Space Settings -> Manage pages -> Hidden, where Confluence will list them so you can get to them quickly.  

I'm not sure why Atlassian changed the name to "hidden", when "orphan" was more clear (maybe it's only clear to English speakers?).  The URL still has orphan in it, the example I traced through because I wasn't sure where they'd moved it to in the new admin layout was  https://aclsandbox.atlassian.net/wiki/pages/listorphanedpages.action?key=HNM

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence administration, confluence admin training, confluence learning path, manage users and permissions, confluence certification, atlassian learning, cloud admin tools, streamline collaboration, confluence admin best practices

New Confluence Admin Learning Path! 🤩

Confidently manage users, permissions, and content in Confluence. This self-paced learning path helps admins streamline collaboration, improve user experience, and apply the best practices to get the most out of Confluence in any cloud environment.

Start Learning Now
AUG Leaders

Atlassian Community Events