Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Unpublish parent page and Publish only Child page without publishing its parent page causing 404 in publishing instance.

Avatar

Level 2

I have a scenario like below page structure.
Home -> First level -> Second Level -> Third Level
From the above page structure I unpublished Second level page( which automatically unpublish Third level page also). Now I published Third level page only without publishing its parent page(Second level page). When I try to open Third level page in publishing instance causing 404. I verified node structure in publishing instance and observed jcr:content node is missing for Second level page. Due to this not able to see all pages starting from First level and its all child pages, second level pages and its all child pages also third level pages.
I know when we publishing third level page alone without its parent page, Third level page will be bad link. But starting from first level page page all pages are broken.
Any solution for this?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

As said, I think that your content architecture does not match the implementation assumptions of the components you use. What is the purpose of these 2nd level item/page if does not render any content nor should be appear in the navigation?

View solution in original post

5 Replies

Avatar

Community Advisor

@DharmaRaju,

Yup, in order to serve child resources in the JCR, it needs to have a parent. 
What you can do is publish the parent page, set a 301 redirect, and also ensure that the page is setup with some robot rules, like noindex,nofollow.

Goodluck, Brian.

Avatar

Level 2

Thank you @BrianKasingli 

I'm expecting a solution without publishing parent page. Even child page and its immediate parent page(un published parent page) will not be available in publish environment.

Here with this issue(un published parent page) not able to view parent page, grand parent page, parent page siblings and child pages.

I'm expecting solution that only broken pages will not be able to view in publish environment and able to view other pages( parent page, grand parent page, child pages).

Hope you understand my problem.

Avatar

Employee Advisor

This behavior is expected, although the individual effects (broken navigation etc) is very much depending on the components. It looks like your navigation component expects all elements it deals with to be pages. But now this removed-and-then-added-again node is not a page (anymore), but just a nt:unstructured. And this breaks the rendering.

 

I see a more fundamental problem in the content architecture, when you want to deactivate/remove a single page in the content hierarchy without removing all of its child pages as well. It is pretty much like you have a folder on your computer, which you want to remove but keep all its child folders (without moving them elsewhere).

 

 

 

 

 

Avatar

Level 2

Hi Jorg,

Thanks for your update. In my scenario I deactivated parent page of second level and activated only child page (third level page). I verified in publish environment and observed child page(third level page) contains jcr:content node and its parent page(second level page) of type cq:page only(not nt:unstructured) but jcr:content node is not there for second level page.

Also in general child page(third level)  and its immediate parent page(second level) only having issues with non existence of jcr:content node. But first level page and all its child pages are having issue while rendering. I hope need to update rendering logic in navigation, breadcrumb and other places where we are rendering pages based on hierarchy.

Suggest me with your ideas.

Avatar

Correct answer by
Employee Advisor

As said, I think that your content architecture does not match the implementation assumptions of the components you use. What is the purpose of these 2nd level item/page if does not render any content nor should be appear in the navigation?