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?