2

I have upgraded from Sitecore 8.2 to Sitecore 10.1.

The layouts are rendered fine but none of the components are rendering. Seems like the placeholders are not working.

Some of the components are using a main placeholder. If I change the placeholder name to body-top then components start rendering as expected.

This is the main layout

@if (!string.IsNullOrEmpty(strBodyTag))
{
    @Html.Raw(strBodyTag)
}

@Html.Sitecore().Placeholder("body-top")
@Html.Sxa().GridBody()
@Html.Sitecore().Placeholder("body-bottom")
@Html.Sitecore().Placeholder("main-content")
@foreach (string script in assetLinks.Scripts)
{
    @Html.Raw(script)
}
<!-- /#wrapper -->

Do I need to add anything to the layout to render the components properly?

Any help or suggestion would be appreciated.

1
  • the issue was in my SXA. I had to re-install the SXA and then it was fixed Nov 17, 2021 at 3:23

1 Answer 1

2

This issue is not related to the upgrade directly, though it might be classified as a side effect.

There is no any "main" placeholder in the provided Layout:

@Html.Sitecore().Placeholder("main")

The easiest way is to add the "main" placeholder definition just below the "main-content" one to your Layout.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.