Client Libraries Issue CQ 5.6.1 | Community
Skip to main content
Level 2
October 16, 2015
Solved

Client Libraries Issue CQ 5.6.1

  • October 16, 2015
  • 1 reply
  • 558 views

Hi I hope somebody can shed light on an issue i am having in CQ 5.6.1.

I have an issue referencing images in the DAM from client libraries stored in components. The URL path is incorrectly altered when the client library is generated.

The URLS are of the format.

url("/content/dam/company/emea/sprites/homepage-banner-sprite.png")
but it is changed to url("../../../content/dam/company/emea/sprites/homepage-banner-sprite.png")

In version 5.4 is did not alter URLS that where relative but started from the root.

I can think of a number of work arounds, but is there a proper way to address this issue?

 

Thanks.

D

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

Hi D,

In CQ5.4 urls in embedded css files are rewritten relative to the clientlib folder's location. In CQ5.5 onwards this mechanism has been changed and relative paths specified in embedded css files are resolved against the individual css file's location.
Unfortunately there is no option to revert to previous version however you need to use relative paths some thing like "../../sprites/homepage-banner-sprite.png"

Thanks,

Sham

1 reply

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Hi D,

In CQ5.4 urls in embedded css files are rewritten relative to the clientlib folder's location. In CQ5.5 onwards this mechanism has been changed and relative paths specified in embedded css files are resolved against the individual css file's location.
Unfortunately there is no option to revert to previous version however you need to use relative paths some thing like "../../sprites/homepage-banner-sprite.png"

Thanks,

Sham