Topic on Project:Support desk

Main page has no style/css

13
85.219.50.188 (talkcontribs)

Hello,

I am locally creating a wiki for my own projects and I have very limited technical knowledge when it comes to web servers (so please bear with me if I'm clueless about anything). I must mention that I have just installed it and shouldn't have changed anything beyond its base configuration.


The error is that, whenever I access my main page through Firefox, it redirects me to "localhost/wiki/index.php/Main_Page" and shows an image with raw html and no styles whatsoever.


The relevant LocalSettings.php parameters are as follows:

$wgSitename = "Urssos";

$wgScriptPath = "/wiki";

$wgServer = "http://localhost";

$wgResourceBasePath = $wgScriptPath;


PD: I have checked Manual:Common errors and symptoms#The wiki appears without styles applied and images are missing to see if my error is because of anything reported there and had no luck applying the fixes to the best of my ability.

85.219.50.188 (talkcontribs)

I forgot to mention that I am using both the latest version of MediaWiki and XAMPP

Malyacko (talkcontribs)

Hi, please provide your exact versions ("latest" has no meaning). Please open the Developer Tools of your web browser and check the "network" tab for errors.

85.219.50.188 (talkcontribs)

My bad, my MediaWiki version is 1.39 and my PHP version is 7.4.33, both should be compatible if I looked at the requirements right.

85.219.50.188 (talkcontribs)

I've also just checked the network tab and can't seem to find any error codes, everything looks green.

Bawolff (talkcontribs)

Can you find the load.php css requests in the network tab, open them in a new window and see if they look like css? (E.g. do they look like a bunch of text vs say an error message or an html page or blank)

Also be sure you have php error reporting enabled, and check your php error log.

Which skin are you using?

85.219.50.188 (talkcontribs)

When I open the load.php req on a new tab it shows me a pretty long sequence in raw text , without any sort of style either.


Here's a few lines of what shows up:

"mw.loader.implement("jquery@1vnvf",function($,jQuery,require,module){(function(global,factory){"use strict";if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document");}return factory(w);};}else{factory(global);}})(typeof window!=="undefined"?window:this,function(window,noGlobal){"use strict";var arr=[];var getProto=Object.getPrototypeOf;var slice=arr.slice;var flat=arr.flat?function(array){return arr.flat.call(array);}:"


Regarding the PHP error log (and if it's the one located under Apache), the following is what appears to be the issue:


[Mon Dec 05 16:33:05.745365 2022] [ssl:warn] [pid 2076:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:33:05.959412 2022] [core:warn] [pid 2076:tid 428] AH00098: pid file D:/AA MediaWiki/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Mon Dec 05 16:33:05.962414 2022] [ssl:warn] [pid 2076:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:33:07.716811 2022] [mpm_winnt:notice] [pid 2076:tid 428] AH00455: Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/7.4.33 configured -- resuming normal operations

[Mon Dec 05 16:33:07.716811 2022] [mpm_winnt:notice] [pid 2076:tid 428] AH00456: Apache Lounge VC15 Server built: Jun 24 2022 10:13:23

[Mon Dec 05 16:33:07.716811 2022] [core:notice] [pid 2076:tid 428] AH00094: Command line: 'd:\\aa mediawiki\\xampp\\apache\\bin\\httpd.exe -d D:/AA MediaWiki/xampp/apache'

[Mon Dec 05 16:33:07.719812 2022] [mpm_winnt:notice] [pid 2076:tid 428] AH00418: Parent: Created child process 3800

[Mon Dec 05 16:33:08.072891 2022] [ssl:warn] [pid 3800:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:33:08.134905 2022] [ssl:warn] [pid 3800:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:33:08.166913 2022] [mpm_winnt:notice] [pid 3800:tid 432] AH00354: Child: Starting 150 worker threads.

[Mon Dec 05 16:38:54.737854 2022] [ssl:warn] [pid 10748:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:38:54.812671 2022] [core:warn] [pid 10748:tid 428] AH00098: pid file D:/AA MediaWiki/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Mon Dec 05 16:38:54.815672 2022] [ssl:warn] [pid 10748:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:38:54.844679 2022] [mpm_winnt:notice] [pid 10748:tid 428] AH00455: Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/7.4.33 configured -- resuming normal operations

[Mon Dec 05 16:38:54.844679 2022] [mpm_winnt:notice] [pid 10748:tid 428] AH00456: Apache Lounge VC15 Server built: Jun 24 2022 10:13:23

[Mon Dec 05 16:38:54.844679 2022] [core:notice] [pid 10748:tid 428] AH00094: Command line: 'd:\\aa mediawiki\\xampp\\apache\\bin\\httpd.exe -d D:/AA MediaWiki/xampp/apache'

[Mon Dec 05 16:38:54.848680 2022] [mpm_winnt:notice] [pid 10748:tid 428] AH00418: Parent: Created child process 7376

[Mon Dec 05 16:38:55.165715 2022] [ssl:warn] [pid 7376:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:38:55.227719 2022] [ssl:warn] [pid 7376:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:38:55.260719 2022] [mpm_winnt:notice] [pid 7376:tid 432] AH00354: Child: Starting 150 worker threads.


As to what style I'm using, it should be set as Vector in the LocalSettings file.

85.219.50.188 (talkcontribs)

After fixing the error by using "localhost" as the server name, that error has disappeared but the wikimedia page still has no style.

Bawolff (talkcontribs)

So that looks like what load.php should look like for a JS. Do all of them look like that or are some blank or have error messages? In particular, can you check the CSS one too (The css load.php should show up in a different section of the developer toolbar. The url will end in &only=styles&skin=vector )

The PHP log you posted is unlikely to be related to the style issue.

You can double check what skin you are currently using by looking in Special:Preferences.

85.219.50.188 (talkcontribs)

Hmm, the issue might be then that there is no load.php for css. I am currently in the CSS Network tab and nothing shows up at all, but there are no errors in any tab either.


And yes, I have just checked that I'm using Vector.

Bawolff (talkcontribs)

You could look in the view source view, and try and find the <link rel="stylesheet" tag.

85.219.50.188 (talkcontribs)

The only line which contains it should be:


<link rel="stylesheet" href="/wiki/load.php?lang=en-gb&amp;amp;modules=skins.vector.styles.legacy&amp;amp;only=styles&amp;amp;skin=vector"/>

Bawolff (talkcontribs)

I assjme those &amp;amp; are just & ?

what is contents of /wiki/load.php?lang=en-gb&modules=skins.vector.styles.legacy&only=styles&skin=vector ? Is it css? an error? Blank?

Reply to "Main page has no style/css"