error in console on opening aem site edit mode /editor.html/content/sites/sample/en.html

Avatar

Avatar

tasunil

Employee

Avatar

tasunil

Employee

tasunil
Employee

14-12-2020

I am facing one issue, I created a single page website using the samples in AEM 6.5 with sp7 but in the console on opening the html page I am getting, "Refused to apply style from 'http://localhost:4502/etc.clientlibs/settings/wcm/designs/social/console/resources.css' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled." 

2020-12-14 17_59_14-Window.png

 

 What is the cause of this issue and what can be done to avoid this issue? Any help would be great. Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

BrianKasingli

MVP

Avatar

BrianKasingli

MVP

BrianKasingli
MVP

15-12-2020

@tasunil,

404 not found means that your client library does not exist.

Assuming that you are working on the author as your local development environment, you are logged in as an administrator, accessing /etc.clientlibs/* should not be a problem at all with authentication.

The first thing that caught my eye is, does the client library exist in the JCR? In CRX/DE can you find and resolve, /apps/settings/wcm/designs/social/console/resources.css or /libs/settings/wcm/designs/social/console/resources.css. And is this resource a valid client library?

Secondly, once you locate the resources that generate the client library CSS & JS files, copy the clientlib category. Now, double check if the client library is valid using dumplibs tool, localhost:4502/libs/granite/ui/content/dumplibs.html.

 

 

 

 

 

Answers (3)

Answers (3)

Avatar

Avatar

tasunil

Employee

Avatar

tasunil

Employee

tasunil
Employee

15-12-2020

Hello @BrianKasingli 

 

The css is not present in either of the two locations /apps/settings/wcm/designs/social/console/resources.css or /libs/settings/wcm/designs/social/console/resources.css

I did not understand the meaning of And is this resource a valid client library?

I simply created a single page using Link and on editing i am getting this error. I have added no custom css. 

Also in the dumplibs there is no /libs/settings/wcm/designs/social/

Only the following are present

2020-12-15 23_09_00-mRemoteNG - confCons.xml - aemtestmachine iyJcfpncH4v5rMvdKpVO.png

and no path is present by this wcm/designs/social

What css should be added so that this error goes away?

Thanks

Avatar

Avatar

tasunil

Employee

Avatar

tasunil

Employee

tasunil
Employee

15-12-2020

Hi @sureshd71454102, I tried the following steps, but I am still getting the error in the console, I added the paths in the Apache Sling Authentication Service. i did not understand what is to be done with anonymous user access level. this css i have not added so how can i load a full css. and it is saying that localhost page cannot be found at http://localhost:4502/etc.clientlibs/settings/wcm/designs/social/console/resources.css 4042020-12-15 21_37_13-mRemoteNG - confCons.xml - aemtestmachine iyJcfpncH4v5rMvdKpVO.png

Avatar

Avatar

SureshDhulipudi

MVP

Avatar

SureshDhulipudi

MVP

SureshDhulipudi
MVP

15-12-2020

1) can you check Apache Sling Authentication Service and add allow specific routes to be accessible without authorization:

-/libs/granite/ui

-/apps/granite/core/content

This will enable the CSS.

2) Anonymous user access level

3) Check the .css modified files syntax

4) Minification of css files also some times gives error, try to load full css file / check it by accessing directly with url https://localhost:4502/<path>/file.css