adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
730 stars 736 forks source link

[Search] Null pointer exception in SearchResultServlet.getResults(SearchResultServlet.java:172) #929

Closed josephh closed 4 years ago

josephh commented 4 years ago

⚠️ We are using core components v2.3.0; prior to filing this issue I tried setting the core components all version to 2.8.0 but without success, so reverted to 2.3.0. (Upon deploying core components 2.8.0 to our test environment, pages were not rendered and an error was shown Line 44, column 1936 : com.adobe.cq.wcm.core.components.models.Page cannot be resolved to a type).

Bug Report

Current Behavior We have included the core Search component in our custom AEM components; we have 'proxied' via our codebase the Search component and added additional styling and a client-side script to append the Search

to our html
vladbailescu commented 4 years ago

It seems your dispatcher is injecting an extra .html at

publisher request.log - following input into the search component (request via dispatcher) 😒 21/Feb/2020:14:51:50 +0000 [185] -> GET /content/denplan/denplan-homepage.searchresults.json/_jcr_content/root/quick_search .html ?fulltext=teeth&resultsOffset=0 HTTP/1.1 21/Feb/2020:14:51:50 +0000 [185] <- 500 text/html 8ms

josephh commented 4 years ago

Ah! thanks for pointing that out @vladbailescu I completely missed it. I am sure that is the root of our problem.

josephh commented 4 years ago

Yes, apache mod_rewrite is the culprit 😒