Skip to Content
0
Former Member
Sep 03, 2018 at 09:27 AM

How to get a navigation node without setting hardcoded catalog version in Hybris?

195 Views

I call a method from a custom Category Service within an AfterSaveListener and in this method i need root navigation nodes which is returned by cmsNavigationService but whenever I call this method, it throws an error: de.hybris.platform.cms2.exceptions.CMSItemNotFoundException: No NavigationNode with id.

When i set hardcoded content catalog via

 getCatalogVersionService().setSessionCatalogVersion(".....")

I handle this problem but it does not seem true to me. I can handle the same problem for categories by using

 userService.setCurrentUser(userService.getAdminUser());

in order to remove all restrictions for flexible search but this solution did not work for navigation node.

How to solve this problem?