August 22, 2017 by Charles Turano

Disabling Edit and Preview Modes on SXA CD servers

A few days ago, Jammykam published this great article on his blog. I took a look at our SXA website and found that it had the issue he described.

Since SXA manages the site configuration in Sitecore, I quickly realized this was going to be much more interesting than just updating a few config patches. A quick check of the Site configuration item shows that it actually has check boxes for the settings I wanted to change.

SXA Site flags screen shot

Unfortunately, un-checking those items caused issues because the experience editor was disabled on the CM as well as the CD. The content editor still sort of worked, but navigation was broken. I needed to push an un-checked version to the CD's while leaving the item checked on the CM.

It turns out it was very easy to solve:

  1. Un-check the Enable Preview, Enable Web Edit, Enable Debugger and Allow Debug checkboxes on the SXA site item.
  2. Create a new version (version 2) of the Site item
  3. Re-check the fields that were un-checked in step one on the new version of the Site item.
  4. Open publishing restrictions and disable publishing for version 2 of the Site item.

When the site was published, the correctly configured version of the item was pushed to the CD's while leaving the version with editing enabled active on the CM.

Interested in how Hedgehog used SXA to create our entire site and augmented it to meet editor needs? Una Verhoeven and I are presenting on this subject as part of the Sitecore Virtual Summit on Thursday, August 24.

Keep in Touch and Stay Informed

Get updates, industry reports, white papers and more Hedgehog love.