SAP Knowledge Base Article - Preview

3292640 - JS Source Files Are Missing When WRO4J Configuration Uses a Wildcard Filename

Symptom

When JS files are configured in the 'wro.xml' file using a wildcard ('*') in the filename, as the following tag exemplifies, they are missed by WRO4J during compression:

  • <js>/_ui/responsive/common/js/cms/*.js</js>

In some scenarios, the Storefront UI might be broken because 'all_responsive.js' and 'addons_responsive.js' are generated without their dependency JS files and/or unexpected HTML content  could be included in the compressed JS files, please refer to the 'SAP Commerce + Wro4j : HTML in JavaScript Issue' wiki. Besides the symptoms already described, the following logs can also be found on OpenSearch:

  • Uncaught ReferenceError: $ is not defined
  • Uncaught SyntaxError: Unexpected token '<' 

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.


Read more...

Product

SAP Commerce Cloud 2205 ; SAP Commerce Cloud 2211

Keywords

compressing, wro, wro4j, wildcard, not defined, unexpected token, js files, hybris, commerce, ccv2 , KBA , CEC-SCC-COM-BCA-COR , Core Accelerator , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.