Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

YUIScriptProcessor is breaking my site on Publish.

Avatar

Level 4

I have the YUI processor set to minify my JS on Publish and this is causing it to break, I know this because I don't have it on Author and the site works like a charm. I checked the logs and this is what I got:

 

19.05.2021 12:31:18.161 *ERROR* [0:0:0:0:0:0:0:1 [1621449074509] GET /content/whisl/en.html HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.YUIScriptProcessor 
[ERROR] 19146:30867:unterminated string literal
19.05.2021 12:31:18.161 *ERROR* [0:0:0:0:0:0:0:1 [1621449074509] GET /content/whisl/en.html HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.YUIScriptProcessor 
[ERROR] "use strict";function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}

 

 

I managed to track the error to a clientlib javascript file we use for forms called parsley.js but I am stumped on how to fix this. Do I need a polyfill to fix this? Something else perhaps? Any help would be appreciated.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
4 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Level 4
Thanks for the suggestion. We have multiple sites on the instance so can I just add GCC to this site's clientlibs by modifying the xml?

Avatar

Level 4
Adding: jsProcessor="[min:gcc;obfuscate=true]" to the .content.xml

Avatar

Community Advisor

@Jeanmaradiaga Yes. You can do the same by adding the below config and it will work for the specific site.

I personally use only this:

allowProxy="{Boolean}true"      
cssProcessor="[min:yui]"
jsProcessor="[min:gcc]"