---
title: "Publishing a page without a parent page in the target space"
canonical: "https://support.appfire.com/space/CPCL/1177682030/Publishing%20a%20page%20without%20a%20parent%20page%20in%20the%20target%20space"
format: markdown
---
> Macro (aura-html)


## Problem

> Macro (excerpt)
> 
> If you publish a child page and the parent page is not present in the target space,  the child page is created and placed in the root directory of the target space.
> 
> #### Single page publishing
> 
> This is most likely to occur when using [single-page publishing](https://appfire.atlassian.net/wiki/spaces/CPCL/pages/646578988) as it only publishes the current page. Problems occur if
> 
> - the target space parent page no longer exists
> - has not yet been published
> 
> #### Space publishing
> 
> Publishing to the root of the space may also occur when [space publishing](https://appfire.atlassian.net/wiki/spaces/CPCL/pages/647038008).
> 
> Changing the space home page in the target space after the first space publishing action can cause the publishing of source space pages to the root of the target space.

## Solution

> Macro (excerpt)
> 
> If a page is published to the target space with an incorrect hierarchy
> 
> - ensure that the parent page is published and present in the target space
> - then re-publish the child page to establish the correct hierarchy
> 
> If the space home page has changed, in either the source or target space after the initial space publishing you may need to publish the whole space again to avoid pages being published to the root of the target space.
> 
> > 📝 [Hierarchy is maintained where possible when publishing](https://appfire.atlassian.net/wiki/spaces/CPCL/pages/646906021) - however in some cases the order in the hierarchy is not maintained and my need to be manually changed in the target space.