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 under jcr:contentnodes 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:

  1. Inspect the JSON output of the affected folder (for example, http://host:port/content/path/to/folder.3.json) or check the content in crx/de.Look for child pages missing properly populated jcr:content nodes, which should include properties like cq:lastModified.
  2. For each problematic page, add a properly configured jcr:content node or delete the entire node. Ensure required properties like cq:lastModified and other relevant metadata are included.
  3. 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.
  4. 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.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f