adobe / aem-core-cif-components

A set of configurations and components to get you started with AEM Commerce development
Apache License 2.0
102 stars 80 forks source link

CatalogPageNotFoundFilter not called for specific product or category pages #990

Open buuhuu opened 10 months ago

buuhuu commented 10 months ago

The CatalogPageNotFoundFilter returns a 404 if a product or category does not exist, or the graphql query fails.

This works fine for the generic product page, but not for specific pages, see the request log as example. The CatalogPageNotFoundFilter should come after the SpecificPageFilterFactory.

 0 TIMER_START{Request Processing}
      0 COMMENT timer_end format is {<elapsed microseconds>,<timer name>} <optional message>
      5 LOG Method=GET, PathInfo=null
      6 TIMER_START{handleSecurity}
   1976 TIMER_END{1969,handleSecurity} authenticator org.apache.sling.auth.core.impl.SlingAuthenticator@2d080ec6 returns true
   3205 TIMER_START{ResourceResolution}
   4168 TIMER_END{962,ResourceResolution} URI=/content/site/gb/en/product.html/round-signet-ring.html resolves to Resource=JcrNodeResource, type=cq:Page, superType=null, path=/content/site/gb/en/product
   4174 LOG Resource Path Info: SlingRequestPathInfo: path='/content/site/gb/en/product', selectorString='null', extension='html', suffix='/round-signet-ring.html'
   4174 TIMER_START{ServletResolution}
   4177 TIMER_START{resolveServlet(/content/site/gb/en/product)}
   4199 TIMER_END{21,resolveServlet(/content/site/gb/en/product)} Using servlet BundledScriptServlet (/libs/cq/Page/Page.jsp)
   4200 TIMER_END{26,ServletResolution} URI=/content/site/gb/en/product.html/round-signet-ring.html handled by Servlet=BundledScriptServlet (/libs/cq/Page/Page.jsp)
   4201 LOG Applying REQUESTfilters
   4206 LOG Calling filter: com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl
   4209 LOG Calling filter: org.apache.sling.security.impl.ContentDispositionFilter
   4212 LOG Calling filter: com.adobe.granite.csrf.impl.CSRFFilter
   4217 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
   4221 LOG Calling filter: com.adobe.granite.httpcache.impl.InnerCacheFilter
   4225 LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
   4227 LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter
   4230 LOG Calling filter: com.adobe.cq.wcm.core.components.internal.servlets.CoreFormHandlingServlet
   4232 LOG Calling filter: com.adobe.granite.optout.impl.OptOutFilter
   4239 LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet
   4244 LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
   4245 LOG Calling filter: com.day.cq.dam.core.impl.servlet.DisableLegacyServletFilter
   4250 LOG Calling filter: com.adobe.cq.wcm.core.extensions.amp.internal.AmpModeForwardFilter
   4636 LOG Calling filter: com.adobe.granite.uriprovider.dba.DBAHeaderFilter
   4646 LOG Calling filter: com.digitalstudio.core.filters.LoggingFilter
   4649 LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter
   4651 LOG Calling filter: com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl
   4661 LOG Calling filter: com.adobe.cq.commerce.core.components.internal.servlets.SpecificPageFilterFactory
   6635 LOG Including resource JcrNodeResource, type=venia/components/page, superType=null, path=/content/site/gb/en/product/signet-rings/jcr:content (SlingRequestPathInfo: path='/content/site/gb/en/product/signet-rings/jcr:content', selectorString='null', extension='html', suffix='/round-signet-ring.html')
   6637 TIMER_START{resolveServlet(/content/site/gb/en/product/signet-rings/jcr:content)}
   6649 TIMER_END{11,resolveServlet(/content/site/gb/en/product/signet-rings/jcr:content)} Using servlet BundledScriptServlet (/apps/venia/components/page/page.html)