System Notifications not working with a pathnotfoundexception - unified console aemasacs
AEMasaCS(latest build - 2022.11.9850.20221116T162329Z, able to reproduce on earlier) ACS-aem-commons 5.4.0 Reproducible on Latest? yes
experiencing an issue with the system notifications not being applied at all
logging a pathnotfound, but both the service user and the acls are intact
javax.jcr.PathNotFoundException: Node with path /etc/acs-commons/notifications/2021/06-maintenance does not exist.
09.01.2023 10:48:37.114 [cm--e**-aem-author-**-mcbkn] WARN [sling-threadpool-f19941e2-7307-44f7-8b8f-bf2c2f8ae8c9-(com.day.cq.wcm.workflow.impl.wcmworkflowserviceimpl)-3] com.day.cq.wcm.workflow.impl.WcmWorkflowServiceImpl No resource found at the path : /etc/acs-commons/notifications/2021/06-maintenance
at com.adobe.acs.commons.http.injectors.AbstractHtmlRequestInjector.doFilter(AbstractHtmlRequestInjector.java:64) [com.adobe.acs.acs-aem-commons-bundle:5.4.0]
at com.adobe.acs.commons.granite.ui.components.impl.include.IncludeDecoratorFilterImpl.doFilter(IncludeDecoratorFilterImpl.java:92) [com.adobe.acs.acs-aem-commons-bundle:5.4.0]
at com.adobe.acs.commons.granite.ui.components.impl.include.IncludeDecoratorFilterImpl.doFilter(IncludeDecoratorFilterImpl.java:92) [com.adobe.acs.acs-aem-commons-bundle:5.4.0]
at com.adobe.acs.commons.granite.ui.components.impl.include.IncludeDecoratorFilterImpl.doFilter(IncludeDecoratorFilterImpl.java:92) [com.adobe.acs.acs-aem-commons-bundle:5.4.0]
I expect this to relate to the new unified console introduced around Oct 22 - /ui#/aem/start.html/
The nofication works if you go directly for the content page though, skipping the overlay - which might confirm the root cause

Thanks!
Expected Behavior
System Notification displayed according to the configuration
Actual Behavior
Configuration not respected, notification not displayed, error logged. The nofication works if you go directly for the content page skipping the overlay
Steps to Reproduce
Set up a system notification, open new author window, clear/incognito within the notification enabled timeframe
Links
https://adobe-consulting-services.github.io/acs-aem-commons/features/system-notifications/index.html
@adamzwoniarski do you have any idea why there's that Workflow service at the top of the stack trace? Does that stack trace trigger everytime you reload the page?
also - can you confirm this goes away if you disable Unified Shell? (IIRC the toggle is in Tools > Cloud Services > Unified Shell ... i think its in Cloud Service atleastS)
@stack trace - no idea on the workflow, we do not have any customizations here - I see only one log entry on this - possibly during the configuration.
@unified shell disabled - the notification is presented!
For myself even removing the unified shell doesn't work. The message never gets shown
@royteeuwen we're able to use it with the unified shell disabled on production maintenance (cloudservice) odd then ;]
Hey, any actions planned? Thanks
In general there is little planning in Open Source, everyone contributes what bothers him. What would help if someone could provide a PR. @adamzwoniarski Would you be able to come up with one, then I can review.
@adamzwoniarski can you check if this is fixed in ACS AEM Commons 6.0.6?
I believe this should fix it: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/wcm/notifications/impl/SystemNotificationsImpl.java#L85-L90
The reason is broke was Unified shell loads AEM in an iframe, and we had previously put code in to block showing system notifications in an iframe because things like Page Editor load parts of AEM in an iframe -- so we had to adjust some of the iframe checks.