adobe / adobe/aem-project-archetype

It is not possible to publish sample page (NPE)

Open
#676 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
596
Forks
431
Avg merge
10d 6h
Merged PRs (30d)
1

Description

### Expected Behaviour
After creating a project from the archetype it is possible to publish a sample page
### Actual Behaviour
It is not possible to activate the sample page created by the archetype (/content/mysite/us/en). The error in touch-ui is shown. Activation causes the NullPointerException thrown by ExperienceFragmentsReferenceProvider because the sample page references the Experience Fragments which don't have cq:lastModified properties set

![image](https://user-images.githubusercontent.com/58666439/114712712-b07e7280-9d30-11eb-82e3-479bf1c7042b.png)

### Reproduce Scenario (including but not limited to)

#### Steps to Reproduce
1. Create a mysite project from the latest archetype
2. Go to /content//us/en.html using touch-ui
3. Publish page
#### Platform and Version
AEM 6.5.7
Archetype 27

#### Sample Code that illustrates the problem
n/a

#### Logs taken while reproducing problem
`14.04.2021 14:31:03.217 *ERROR* [172.19.0.1 [1618403410074] POST /libs/wcm/core/content/reference.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
java.lang.NullPointerException: null
at com.adobe.cq.xf.impl.ExperienceFragmentsReferenceProvider.findReferences(ExperienceFragmentsReferenceProvider.java:164) [com.adobe.cq.cq-experience-fragments:1.2.76]
at com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServlet.doGet(ActivationReferenceSearchServlet.java:140) [com.day.cq.wcm.cq-wcm-core:5.12.154]
at com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServlet.doPost(ActivationReferenceSearchServlet.java:91) [com.day.cq.wcm.cq-wcm-core:5.12.154]
at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146) [org.apache.sling.api:2.22.0]
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.22.0]
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.22.0]
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) [org.apache.sling.engine:2.7.2]
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) [org.apache.sling.engine:2.7.2]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) [org.apache.sling.engine:2.7.2]
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:156) [com.day.cq.wcm.cq-wcm-core:5.12.154]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.7.2]
at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375) [com.day.cq.wcm.cq-wcm-core:5.12.154]
at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190) [com.day.cq.wcm.cq-wcm-core:5.12.154]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.7.2]
at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91) [com.day.cq.wcm.cq-wcm-core:5.12.154]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.7.2]
at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94) [com.day.cq.cq-personalization:5.12.44]`

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by creating the latest mysite archetype project and publishing /content//us/en.html in Touch UI on AEM 6.5.7. Start at the sample page's Experience Fragment references and the ExperienceFragmentsReferenceProvider.findReferences stack-trace entry point. Done means the archetype-created sample page can be published without a NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.