0

Our solution is currently on Sitecore 9.0.2 with SXA 1.8 , until yesterday all our deployments were working as expected. All of a sudden, I am facing the Mythical Body-top placeholder problem - http://blog.martinmiles.net/post/mythical-sxa-body-top-placeholder

  1. I have tried adding a new Theme
  2. Re-serializing my theme as mentioned in the blog post
  3. Compared the Configs
  4. Compared HMTL on SXALayout.cshtml

The same build deployed on a Higher environment is working as expected

Has anyone here faced a similar problem, any suggestions to resolve it?

Update:

As suggested in the comments , i have deleted the Optimize-min items from all themes , there are no javascript errors on the console

enter image description here

2
  • Do you have a custom theme there? Are there any console errors? Typically, when there is a custom script in the custom theme which is causing problems (console errors) the logic which is hiding those placeholders is not triggered. Check that... I would also check if the problem will be gone when you will remove all optimize-min items from all themes (your custom one and all SXA base themes). Commented Apr 23, 2019 at 13:52
  • @DawidRutkowski , thanks for you reply , yes we have a custom theme , there are no console errors (please check the image attached in Question) , i have also deleted all optimize-min items from all the themes , unfortunately the problme still persists , is there anything else i can check ? Commented Apr 23, 2019 at 14:33

1 Answer 1

2

I assume you have also custom layout not only custom theme that you have created.

Create this patch file and insert your layout ID (in this format {BCFC7537-EFF4-434C-96F5-BF4F55FD175B} - This is ID of default SXA MVC Layout) where I put placeholder text ($Insert_Your_Layout_ID_here$):

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <experienceAccelerator>
      <mvc>
        <!-- List of placeholders which should be hidden. -->
        <hiddenPlaceholders>
          <layout id="$Insert_Your_Layout_ID_here$">
            <placeholder name="head"/>
            <placeholder name="body-bottom"/>
            <placeholder name="body-top"/>
          </layout>
        </hiddenPlaceholders>
      </mvc>
    </experienceAccelerator>
  </sitecore>
</configuration>

Afterwards body-top placeholder should be hidden.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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