4

This is a clean install of Sitecore 9.1 with SXA 1.8.0. When I export the site using Creative Exchange (Both to zip or folder), the exported index.html file is linking to the optimized-min files instead of linking to the individual files like it used to in v1.7.1 and lower.

Example of the new links:

<link href="-/media/Feature/Experience-Accelerator/Bootstrap-4/Bootstrap-4/Styles/optimized-min-1.css" rel="stylesheet">
<link href="-/media/Base-Themes/Core-Libraries/styles/optimized-min-2.css" rel="stylesheet">
<link href="-/media/Base-Themes/Main-Theme/styles/optimized-min-3.css" rel="stylesheet">

These files are not exported, and so the static html version of the site does not show the styles correctly.

The site is working correctly in Sitecore, but I have also noticed that the site no longer obeys the aodisabled= query string.

3

This is due to a new setting added to SXA in 1.8 that has a known bug.

The setting is XA.Foundation.Theming.AssetsOptimizationSwitch.Enabled, it is disabled by default so that users cannot disable the asset optimizer on the CD servers.

As a work around, for now you can re-enable the asset optimizer switch and also disable the asset optimizer for your site. It will then export correctly. This patch file will re-enable the switch:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
  <sitecore>
    <settings>
        <setting name="XA.Foundation.Theming.AssetsOptimizationSwitch.Enabled" set:value="true" />
    </settings>
  </sitecore>
</configuration>

Now in your site, disable the asset optimizer: Disable asset optimization for your site

Once you have done that, Creative Exchange will export your static file references correctly. This behavior should be fixed in the next update.

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.