Fixing “Failed to load data” error when sorting on “Modified” column in AEM Sites
When you sort content by the Modified column in Adobe Experience Manager (AEM) Sites, you might see a Fail to load data error. This usually happens because some child pages have missing or improperly populated jcr:content
nodes, causing a NullPointerException during sorting. To resolve, fix jcr:content
nodes metadata.
Description description
Environment
Adobe Experience Manager, v6.5
Issue/Symptoms
When you navigate to a specific folder in AEM Sites and switch to list view, clicking the Modified column to sort content may result in:
- An error pop-up with the message Fail to load data.
- Logs indicating a NullPointerException due to missing
cq:lastModified
properties underjcr:content
nodes for certain child pages:
*ERROR* [ NoRequestId] [ 1.2.3.4 [ 1743697714011] GET /mnt/overlay/wcm/core/content/sites/jcr:content/views/list.0.40.html/content/path/to/folder HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException java.lang.NullPointerException: null.
Resolution resolution
To resolve the issue, follow these steps:
- Inspect the JSON output of the affected folder (for example,
http://host:port/content/path/to/folder.3.json
) or check the content incrx/de.
Look for child pages missing properly populatedjcr:content
nodes, which should include properties likecq:lastModified
. - For each problematic page, add a properly configured
jcr:content
node or delete the entire node. Ensure required properties likecq:lastModified
and other relevant metadata are included. - After updating the affected pages, navigate back to the folder in AEM Sites, switch to list view, and attempt sorting by the Modified column again.
- Check other branches or folders within your site structure for similar issues and repeat steps 1–3 if necessary.
Ensuring all child pages have complete and consistent metadata under their jcr:content
nodes will make the sorting functionality work correctly.