[RESOLVED] problems loading css

Jump to: navigation, search

sometimes when I reload the page in the browser, it happens that the css does not get load...any idea why this happens?

I have installed the version 1.20.6

This is the address of the wiki: www.codegaia.com

Saeros (talk)01:54, 10 July 2013

I'd start checking the output of the Java Script console of your browser for potential errors. There is also http://www.mediawiki.org/wiki/Manual:How_to_debug providing some pointers.

AKlapper (WMF) (talk)13:58, 10 July 2013
 

Thanks for the reply, but still I can not find the problem.

my browser console brand me the following problem:

GET http://www.codegaia.com/load.php?debug=false&lang=es&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles&skin=vector&* 500 (Internal Server Error) index.php:12

GET http://www.codegaia.com/load.php?debug=false&lang=es&modules=startup&only=scripts&skin=vector&* 500 (Internal Server Error) index.php:17

i have my wiki hosted in ipage, I don't know if the real problem is the hosting, i have tried installing previous versions but i had the same problems.

Saeros (talk)00:47, 17 July 2013

Hi Saeros,

I have also the same problem with mediawiki 1.19.1 installed on ipage server. CSS doesn't load with Firefox once I reload the page but it does with Google Chrome for example.

The browser console of Firefox brand me the following problem:

[16:00:48,716] GET http://en.solarpedia.net/wiki/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles&skin=vector&* [HTTP/1.1 500 Internal Server Error 892ms]

[16:00:48,718] GET http://en.solarpedia.net/wiki/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector&* [HTTP/1.1 500 Internal Server Error 636ms]

[16:00:48,719] GET http://en.solarpedia.net/wiki/load.php?debug=false&lang=en&modules=skins.vector&only=scripts&skin=vector&* [HTTP/1.1 500 Internal Server Error 1331ms]

I found otherwhere that's the problem is that the web server is configured to serve .css files as text/plain and not text/css.

Someone could resolve it ?

Vincent

85.69.60.15914:41, 7 September 2013

Vincent, the problem is not (only) it's sending CSS as text/plain, but the 500 Internal Server Error responses. Please check out the server error logs to get a detailed error message about what's failing.

Ciencia Al Poder (talk)12:38, 8 September 2013

Ciencia, thank you for your reply. I found my problem. I added the code

body.page-Main_Page h1.firstHeading { display:none; } to commonElements.css in order to not have the title in Main Page. I deleted this line, and now it's working !

I have just to find another way to not have the title in Main Page.

Vincent

85.69.60.15915:30, 8 September 2013
 

Sorry, I spoke to fast.. It's still not resolved..

Vincent

85.69.60.15915:39, 8 September 2013
 
 
 

Hi Saeros,

I have exactly the same problem. I have visited your website, but you have no reload problems anymore.

What did you change?

Jos

81.58.150.7322:20, 5 September 2013

Jos, 500 errors can be produced by various issues. Without knowing which exact error do you have, you can't assure you have the exactly the same problem. Read Manual:How to debug and come back with the detailed PHP error you get

Ciencia Al Poder (talk)09:46, 6 September 2013

Hi Saeros,

I have done all the debugging I could, but no PHP errors, all I could see -using firebug- was the 500 internal server error. My hosting company is FatCow.

Any help would be appreciated,

Thanks, Jos

81.58.150.7320:40, 13 September 2013

Hi,

This problem has been mentioned here recently : Manual:Load.php

I tried to fix it by adding a RewriteRule in the file .htaccess. However, styles don't display everytime with Firefox, and half the time with google. I have mediawiki 1.19.1 and PHP 5.2.17. My hosting company is IPage.

What can be wrong ?

Vincent

85.69.60.15919:06, 17 September 2013
Edited by author.
Last edit: 11:39, 25 September 2013

Hi Vincent,

I discovered that loap.php is sometimes not loaded (500 internal server error), so the RewriteRule in .htaccess has no effect.

Now I use a very dirty hack, I am loading the css the "old" way... I use the skin cologneblue. Edit your own skin.php for instance skins/vector.php.

In the skin file look for

function setupSkinUserCss

and (in my case) add:

$out->addStyle( 'cologneblue/screen.css', 'screen' );

So

$out->addStyle( 'cologneblue/screen.css', 'screen' );

generates in the html file:

<link rel="stylesheet" href="/skins/cologneblue/screen.css?303" media="screen" />

It is working 100% of the time.

Good luck, Jos

JosNederland (talk)11:09, 18 September 2013

Hi Jos,

that is really dirty. Instead of fixing the symptoms, you should cure the cause! Get more details about the 500 server error and fix that one instead!

88.130.64.8814:01, 18 September 2013
 

Hi Jos,

Thank you very much ! That's maybe dirty but it's works! I don't know if it is possible to fix it otherwise when we can't configure the server (My hosting company is IPage.)

So I added the $out->addStyle( 'vector/screen.css', 'screen' ); line inside the function unction setupSkinUserCss of the skins/vector.php file and know it is working for Firefox and Google Chrome all the time ;) Thx! Vincent

85.69.60.15918:23, 18 September 2013

I have been having exactly the same symptoms. My server provider is iPage and I have installed mediaWiki version 1.21.2. Same 500 server error on alternate refresh requests from Chrome and on every refresh request on Explorer. Unfortunately the $out->addStyle( 'vector/screen.css', 'screen' ); fix proposed by Jos/Vincent did not work for me. The upshot of this hack is that the it seems to result in a partial style sheet being loaded, but the 500 server error continues and the style is still corrupted. Also I tried adding $wgResourceLoaderDebug=true to LocalSettings.php, no fix here either.... Any other ideas? Guy

80.47.255.19019:47, 21 October 2013

Have you tried manually changing debug=false to debug=true in the load.php query string for the CSS? That's what tipped me off to the workaround that helped for me, and it's possible I wrote something incorrectly in my earlier post. Since then I have upgraded to a newer version of MW to no avail, and tried fishing with various .htaccess and php.ini settings.

Shiroi Hane (talk)20:29, 21 October 2013

Still, without a descriptive error message we can't help you with that problem.

Ciencia Al Poder (talk)09:39, 22 October 2013
 

Thanks. Yes, I can confirm that the problem is not present when I enable the resource loader debug. This does not help much though as no work-around is obvious to me and I would rather not leave debug turned on.

Guy

80.47.255.19016:11, 26 October 2013
 
 
 
 
 
 
 

Jos, 500 errors can be produced by various issues. Without knowing which exact error do you have, you can't assure you have the exactly the same problem. Read Manual:How to debug and come back with the detailed PHP error you get

Ciencia Al Poder (talk)09:46, 6 September 2013

I've been having the same problem for some time, and found my way here when I discovered that load.php?debug=false&lang=en&modules=skins.vector&only=styles&skin=vector&* was producing an error 500 50% of the time. None of the fixes mentioned above help in any way. Nothing is appearing in the script error logs and no amount of changes to the error logging settings in php.ini make any errors appear. What I did discover, however, is that the problem goes away if I change the string to debug=true and thus I can work around the problem by adding $wgResourceLoaderDebug=true to LocalSettings.php, although what other effects that may have I do not know.

Shiroi Hane (talk)13:11, 19 September 2013

Exact same url, exact same problem, works half the time, doesn't work half the time for Firefox users using the same version and same environment. The fix is the same, turn $wgResourceLoaderDebug=true in LocalSettings.php, now all our users are happy. I'm leaving it on permanently.

Caswick (talk)22:04, 11 March 2014
 
 
 

I'm having the same error. However, after activating all kind of debugs that are documented in the Manual:How to debug, no error is printed, either in the log or in the resulting web page. After examining the apache error log when loading the url:

http://localhost/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.monobook&only=styles&skin=monobook&*

I get the following:

[Sat Nov 16 13:49:17 2013] [notice] child pid 30542 exit signal Segmentation fault (11)

So it seems it's an error with PHP itself. The PHP version I'm using is 5.3.23-pl0-gentoo.

114.199.38.3112:59, 16 November 2013

Gentoo? it's a known problem, then. Thanks for the apache log line.

See Thread:Project:Support_desk/Load.php causing segfault. You may need to upgrade PHP from Gentoo, or even uninstall PHP, download it from PHP website and compile it yourself.

Ciencia Al Poder (talk)13:21, 16 November 2013