Expand my Community achievements bar.

SOLVED

css and js files in clien libs are not updated after moving code to PROD

Avatar

Level 3

hi,

please provide a solution for below 2 problems..

1.   I have pushed my code to prod ... all he changes are reflected except  the clientlibs. So ... how to debug the issue.

      Any other way except  cache clear , akamai purge etc..

2.  Is it possible to recompile the jsp files alone ?? If so how to proceed.

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor
  • Regarding the clientlibs: Check if have a problem with dispatcher caching (by appending a random querystring to the URL); if that's the case and you get the correct version with this trick, purge the dispatcher cache. And to avoid this issue in the future I would recommend you to use the Versioned Clientlib feature of ACS AEM Commons [1].
  • You should not need to recompile the JSPs, as the invalidation should work by default. If you really think, that you have a compilation problems with JSPs, try localhost:4502/system/console/fsclassloader and use the "Clear class loader" button at the top-right. If it works then and your problems are gone, report this to Adobe support.

Jörg

[1] Versioned ClientLibs

View solution in original post

2 Replies

Avatar

Level 4

I would advice not to debug issues of this nature in PROD environment as it may pose severe performance issues or may be an outage.

So, please validate if you could reproduce the issue on a lower environment (QA, Dev servers) before you try in PROD.

Regarding the solution for the issues you have asked...


For the #1

Here are the options though

  • Modify the .js, .css files that is included in the library by adding a space - A change here sometimes rebuild this particular client library
  • Open js.txt or css.txt files that are associated with this clientlibs which are supposed to be rebuilt, go the end of the file and just add a space - this is supposed to rebuild the cache.

Not recommended options unless you ran out of all the options...

  • Invalidating all clientlibs. This would take a lot of time and potentially slow down the things.

          URL: http://localhost:4502/libs/granite/ui/content/dumplibs.rebuild.html?invalidate=true

  • Manually clear the libs from /var/clientlibs
  • Restart the Publish instance node

#2  For recompiling JSPs, here is the quick solution. But again, ensure that it is a cache issue first.

go to this following URL and click the button to recompile all the JSP files.

http://localhost:4502/system/console/slingjsp

Hope this helps!

Avatar

Correct answer by
Employee Advisor
  • Regarding the clientlibs: Check if have a problem with dispatcher caching (by appending a random querystring to the URL); if that's the case and you get the correct version with this trick, purge the dispatcher cache. And to avoid this issue in the future I would recommend you to use the Versioned Clientlib feature of ACS AEM Commons [1].
  • You should not need to recompile the JSPs, as the invalidation should work by default. If you really think, that you have a compilation problems with JSPs, try localhost:4502/system/console/fsclassloader and use the "Clear class loader" button at the top-right. If it works then and your problems are gone, report this to Adobe support.

Jörg

[1] Versioned ClientLibs