Nested placeholders are not rendered in Layout Service


Description

Next.js-based JavaScript Services (JSS) applications might not work correctly when having Sitecore Headless Services 18.0.0 and Sitecore Experience Accelerator (SXA) installed. 

Sitecore Headless Services 18.0.0 contains an updated version of Sitecore Layout Service. At the same time, SXA has its own copy of the Layout Service configuration so it can render JSON output without Headless Services. When SXA and Sitecore Headless Services modules are installed together, the SXA configuration takes over the original Layout Service configuration.

This results in nested placeholders not being rendered in the Sitecore Layout Service output.

The issue does not affect Sitecore Headless Services 19.0.0 and later versions.

Solution

To resolve the issue remove or disable the following configuration file:

modules/sxa/z.layout.service/layout.service.config