Topic on Project:Support desk

Logo and favicon not showing despite viewable using direct URL

8
Meatshell (talkcontribs)

I'm trying to setup our wiki here:

http://cse.hcmut.edu.vn/aclab/index.php/ACLab

This is the direct URL to the logo: http://cse.hcmut.edu.vn/aclab/images/6/6c/Bklogo.png

I tried to setup the logo using:

$wgLogo = 'http://cse.hcmut.edu.vn/aclab/images/6/6c/Bklogo.png';

Or

$wgLogo = '/images/6/6c/Bklogo.png';

But both didn't work.

The same goes for favicon, here is its direct URL: http://cse.hcmut.edu.vn/aclab/images/favicon.ico

I tried setting $wgFavicon similarly to the logo, but both of them didn't work.

AhmadF.Cheema (talkcontribs)

I tested with the absolute URL for the logo, it appeared to be working on my end.

Can you confirm that you had cleared the cache? Additionally, see if your browser developer tools (F12) give any errors under its Console tab.

Meatshell (talkcontribs)

Sorry for the late reply.

I cleared the browsing cache but it didn't work. The logo and favicon are still not shown.

There is no error shown in the console tab too.

2003:72:6D1A:4E00:2D3C:AB0C:626:585 (talkcontribs)

When I view the wiki pages, I do not see logo and favicon.

Your wiki pages contain this URL: http://cse.hcmut.edu.vn/aclab/index.php/favicon.ico.

The "/index.php" in them is wrong. It should not be there. This points to a problem with the different path variables. I think that somehow they are not set correctly.

2003:72:6D1A:4E00:2D3C:AB0C:626:585 (talkcontribs)

And you somehow have a link element on top of all your wiki pages, showing a path to the favicon. I don't know how on earth you got that there, but you should remove this. It is just invalid.

Meatshell (talkcontribs)

Thank you for your inputs.

I forgot to remove that favicon link.

Anyway, here are the relevant variables:

$wgScriptPath = 'http://cse.hcmut.edu.vn/aclab';

$wgStylePath = '{$wgScriptPath}/style';

$wgLogo = 'http://cse.hcmut.edu.vn/aclab/images/6/6c/Bklogo.png';

$wgFavicon = './favicon.ico';

Document root is in /var/www/html/

Ciencia Al Poder (talkcontribs)
37.138.107.131 (talkcontribs)

You obviously had modified the MediaWiki source code, e.g. to get the link to the favicon displayed on top of very page. Do you maybe still have other modifications in the code, which you are using? Maybe it is best to override all the files, which are coming from the MediaWiki tarball with the original file again, to be sure there are no modifications left.

Also note that $wgScriptPath should be a path in the file system. A URL does not work there. Setting it to "/aclab" should help.

If you are not planning to use your own skin directory, you can just remove the line with $wgStylePath.

$wgLogo depend on $wgScriptPath. In you case it should be "{$wgScriptPath}/images/6/6c/Bklogo.png".

$wgFavicon finally should just be "/favicon.ico".

All this leads to this configuration:

$wgScriptPath = '/aclab';

# This line can be removed: $wgStylePath = '{$wgScriptPath}/style';

$wgLogo = "{$wgScriptPath}/images/6/6c/Bklogo.png";

$wgFavicon = '/favicon.ico';