All Forums Viewpoint
KontantinK 10 posts Joined 11/12
27 Nov 2012
Portlet Error 32 stylesheet limit in IE 8

Hello,
I added an existing self-developed portlet in viewpoint webbrowser IE 8. When i added the portlet first time in viewpoint the portlet looks like it should be. But if I refresh the site, if i logged out and logged in again and if I changed the site then the CSS file is not loaded correctly. I get a javascript error in file excanvas.js line 118. That means that there loaded more than 32 Stylesheet (IE can only load 32 CSS-Files).  But I have only one CSS-File. I know that viewpoint loaded own css files. But that can´t be more than 32 CSS-Files.
First I added the CSS-File in the liferay-portlet.xml in the XML-Tag <header-css>. Then I added the CSS-File over the include.jsp in the viewpoint-tag "<vp:managedResources". Every time with the same result. The strange think is, that in my local local development environment everything works fine. The problem only occurs on the Server of the customer. The customer use the Viewpoint Version 13.12.00.03 and i use the version 13.03.00.05.
Has someone an idea how I could solve the problem?

stever 149 posts Joined 08/09
27 Nov 2012

Correct, Viewpoint only loads about 20 CSS files.  Maybe you have a bunch of inline STYLE blocks?

KontantinK 10 posts Joined 11/12
28 Nov 2012

If I add the CSS-File over the liferay-portlet.xml in the XML-Tag <header-css> the CSS-File is loaded multiple times. The strange think is, that if take the CSS-File path out from the liferay-portlet.xml and deploy the portlet again, then the CSS-Files are loading again. Why? What is Viewpoint caching?

stever 149 posts Joined 08/09
28 Nov 2012

CSS files should not be added to the liferay-portlet.xml file.  They should be added in a vp:managedResources tag inside your include.jsp file.  By default CSS files are cached for 1 day in Viewpoint.  You should be clearing you cache or forcing your browser to do a hard refresh when updating CSS files during development.

KontantinK 10 posts Joined 11/12
29 Nov 2012

Yes this is what i did now. I added the css file in the vp:managedResources tag inside the include.jsp. After that i restart Viewpoint. Over that way I clear the cache. Then i deploy the portlet again and the problem resolved.

You must sign in to leave a comment.