Support SiteRoot in Launches


If you open a Launch of an AEM page, the SiteRoot.getRootPath() returns the wrong path.

Steps to reproduce:

  1. Site to site admin, select a page with a Launch (e.g. a page in a translation project)

  2. In the side panel go to References > Launches, select a launch and click on "Go to the Page"

  3. The page is being called in edit mode like

  4. Every component which uses the SiteRoot model (e.g. the main navigation) throws an NPE, because the node at site root level is one of the nt:Folders "launches/2018/10/16" which cannot be adapted to a page

The SiteRoot should use the original root path, when is called from a Launch page


Stefan Seifert
October 19, 2018, 7:08 PM

we have already utility methods dealing with the specialties of launches and version history path

they are used in context-aware configuration extensions, i'm currently not sure if they are also already correctly respected in the handler site root detection (although this is based on caconfig).

make sure to use the latest releases of wcm commons and caconfig extensions.

Masoud Rozati
October 19, 2018, 7:15 PM

yes it is considered while calculating site root level, but not when getting site root path.
I think the fix would be something as simple as this

Stefan Seifert
October 19, 2018, 8:38 PM

this is a good approach - but in my opinion the behavior should be different:
the site root should be within the launch (or the version history), but on the correct position (this was wrong before).

based on your commit i created a feature branch and changed the code accordingly:

Masoud Rozati
October 22, 2018, 12:22 PM

great. I merged the branch into develop.





Masoud Rozati




Fix versions