Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versioned Clientlibs do not rewrite javascript clientlibs in link tags #3507

Open
3 tasks done
rbotha78 opened this issue Jan 14, 2025 · 0 comments · May be fixed by #3508
Open
3 tasks done

Versioned Clientlibs do not rewrite javascript clientlibs in link tags #3507

rbotha78 opened this issue Jan 14, 2025 · 0 comments · May be fixed by #3508

Comments

@rbotha78
Copy link
Contributor

Required Information

  • AEM Version, including Service Packs, Cumulative Fix Packs, etc: 6.5 SP19
  • ACS AEM Commons Version: 5.5.2
  • Reproducible on Latest? yes

Expected Behavior

When adding clientlibs in link tags for preload purposes, it's expected that the clientlib url would be rewritten with the hash.

Actual Behavior

While css urls in link tags are rewritten (only when the type attribute is set to "text/css"), the same does not happen with javascript (even with the type attribute set to "text/javascript"

Steps to Reproduce

Setup a vanilla 6.5 SP19 instance.
Ensure your application is setup to use versioned clientlibs.
Edit the head script of your page and manually add a JS clientlib in a link attribute.
eg. <link rel="preload" href="/etc.clientlibs/mysite/clientlibs/clientlib-mysite.min.js" as="script" type="text/javascript"/>
View the page source as rendered.
Note that the MD5 sum is not added as a selector to the href attribute.

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant