Creative Exchange exports files with broken asset URLs


Description

Browsers might not display styles and scripts correctly, when exporting an SXA website (theme, page) with the Creative Exchange module. The module generates the static files, which were processed by the Assert Optimizer, however, the links to the optimized CSS and JavaScript assets point to files that are not in the .zip package.

For example, a .zip package contains the following files

/sitecore/media/Base Themes/Core Libraries/scripts/optimized-min.js
/sitecore/media/Base Themes/Core Libraries/styles/optimized-min.css

but links to concatenated assets include unwanted numbers and hyphens:

-/media/Base-Themes/Core-Libraries/scripts/optimized-min-1.js
-/media/Base-Themes/Core-Libraries/styles/optimized-min-2.css

This issue affects SXA 1.8.0 and 1.8.1 versions.

Solution

To resolve the issue, consider one of the following options: