Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
453 stars 600 forks source link

Some clientlibs are not versioned #2506

Closed prashantonkar87 closed 3 years ago

prashantonkar87 commented 3 years ago

Required Information

Expected Behavior

After installing ACS Commons package and configuring the rewriter, all clientlibs should be versioned.

Actual Behavior

While some of client-libs are versioned, I can see many client libs are not versioned (i.e., not appended with the random code)

Steps to Reproduce

Setup: https://adobe-consulting-services.github.io/acs-aem-commons/features/versioned-clientlibs/index.html

Analysis

I have configured com.adobe.acs.commons on debug mode. What I observe is that, for the client libs where versioning is not working, I am not seeing the below debug logger: com.adobe.acs.commons.rewriter.impl.VersionedClientlibsTransformerFactory Rewriting to: <new clientlib path> Which means that, the request is not even coming to VersionedClientlibsTransformerFactory.

I see that the client-lib inclusion in my component is in no way different when compared to a client-lib where it is working. I do not see any pattern on the path of client-lib for which versioning is failing. I do not see any errors in logs too.

viveksachdeva commented 3 years ago

I am also facing the same issues.. For me CSS is getting versioned but JS sometimes doesnt.. Restart of server solves the issue sometime as well

viveksachdeva commented 3 years ago

@prashantonkar87 : try 4.11.2.. It fixed for me

davidjgonzalez commented 3 years ago

Fixed via https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/2494

prashantonkar87 commented 3 years ago

Just found out the reason why this was happening. Few HTML's had comments in this format: <!--- Sample Comment---> When the comment was corrected to below, <!--Sample Comment--> It started working fine.