Clientlibrary Folder with images/fonts folder under apps, 404 on publish | Community
Skip to main content
Level 9
October 16, 2015
Solved

Clientlibrary Folder with images/fonts folder under apps, 404 on publish

  • October 16, 2015
  • 7 replies
  • 1891 views

The issue is on publish environment

I have managed to create a client library folder under apps for a component,  and have created a client library folder under etc and embedded the one under apps. In the jsp, i have used cq:includeClientlibrary tag to include the category under etc.

The js and css are being picked up on Publish, but now the images/fonts folders under the clientlibrary folder under apps is not being picked up.

Any help?

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

NitroHazeDev wrote...

Sham HC wrote...

How are you referring the images?  Is url wrongly written for images?

Check AEM version & list of hotfix installed b/n author & publish.    If 5.5 there was hotfix.

 

For now i have moved the clientlibs under etc, instead of using embed, which i was more keen on using.

Images are referenced from within the css/js files, ( ../images/image1.png), when i analyze though with embed approach js and css throws no errors, images still appear to be picked up from apps/ folder structure.

Thus, using embed, the images or fonts under the apps folder were being referenced (path ../../apps/../../image1.png), but the apps folder is locked down on publish. Hence it is not accessible. Though using embed, css and js issues were resolved, issue i was left with was the fonts,images folder under apps/proj/component/testcomponent/clientlibs, 

Is there something more with embed,  or is it a bug that only js and css files can be embedded and not the images or fonts folder within the clientlibrary folder?

 


There is no bug. In CQ5.4 and earlier 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.

7 replies

Level 9
October 16, 2015

Anyone with suggestions?

Sham_HC
Level 10
October 16, 2015

How are you referring the images?  Is url wrongly written for images?

Check AEM version & list of hotfix installed b/n author & publish.    If 5.5 there was hotfix.

Level 9
October 16, 2015

Sham HC wrote...

How are you referring the images?  Is url wrongly written for images?

Check AEM version & list of hotfix installed b/n author & publish.    If 5.5 there was hotfix.

 

For now i have moved the clientlibs under etc, instead of using embed, which i was more keen on using.

Images are referenced from within the css/js files, ( ../images/image1.png), when i analyze though with embed approach js and css throws no errors, images still appear to be picked up from apps/ folder structure.

Thus, using embed, the images or fonts under the apps folder were being referenced (path ../../apps/../../image1.png), but the apps folder is locked down on publish. Hence it is not accessible. Though using embed, css and js issues were resolved, issue i was left with was the fonts,images folder under apps/proj/component/testcomponent/clientlibs, 

Is there something more with embed,  or is it a bug that only js and css files can be embedded and not the images or fonts folder within the clientlibrary folder?

Feike_Visser1
Adobe Employee
Adobe Employee
October 16, 2015

/apps is never opened on publish.

I would move the images/fonts to /etc somewhere.

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

NitroHazeDev wrote...

Sham HC wrote...

How are you referring the images?  Is url wrongly written for images?

Check AEM version & list of hotfix installed b/n author & publish.    If 5.5 there was hotfix.

 

For now i have moved the clientlibs under etc, instead of using embed, which i was more keen on using.

Images are referenced from within the css/js files, ( ../images/image1.png), when i analyze though with embed approach js and css throws no errors, images still appear to be picked up from apps/ folder structure.

Thus, using embed, the images or fonts under the apps folder were being referenced (path ../../apps/../../image1.png), but the apps folder is locked down on publish. Hence it is not accessible. Though using embed, css and js issues were resolved, issue i was left with was the fonts,images folder under apps/proj/component/testcomponent/clientlibs, 

Is there something more with embed,  or is it a bug that only js and css files can be embedded and not the images or fonts folder within the clientlibrary folder?

 


There is no bug. In CQ5.4 and earlier 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.

Level 9
October 16, 2015

Feike Visser wrote...

/apps is never opened on publish.

I would move the images/fonts to /etc somewhere.

 

I agree hence moved it, but hoped embed would fix the issue with images/fonts , while it fixed the css,js issue.

Level 9
October 16, 2015

Sham HC wrote...

NitroHazeDev wrote...

Sham HC wrote...

How are you referring the images?  Is url wrongly written for images?

Check AEM version & list of hotfix installed b/n author & publish.    If 5.5 there was hotfix.

 

For now i have moved the clientlibs under etc, instead of using embed, which i was more keen on using.

Images are referenced from within the css/js files, ( ../images/image1.png), when i analyze though with embed approach js and css throws no errors, images still appear to be picked up from apps/ folder structure.

Thus, using embed, the images or fonts under the apps folder were being referenced (path ../../apps/../../image1.png), but the apps folder is locked down on publish. Hence it is not accessible. Though using embed, css and js issues were resolved, issue i was left with was the fonts,images folder under apps/proj/component/testcomponent/clientlibs, 

Is there something more with embed,  or is it a bug that only js and css files can be embedded and not the images or fonts folder within the clientlibrary folder?

 


There is no bug. In CQ5.4 and earlier 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.

 

Ok so clearly using embed, the images do not get resolved, but the css and js files do, which forced me to go ahead with placing the entire client libs under etc, as Feike mentioned