mtyeh411 / mediawiki-bootstrap

A customizable responsive Bootstrap MediaWiki skin.
GNU General Public License v2.0
78 stars 19 forks source link

Problem getting CSS working #8

Closed jacepp closed 11 years ago

jacepp commented 11 years ago

I've gone through and installed your skin to my MediaWiki, but it seems that all the CSS is not linking properly.

When I click the 'preview' for the Bootstrap skin, all the css is stripped. I've created the 3 pages that you've listed on your Readme section and put in generic lists to have content.

I guess I should mention that this is my first go around with MediaWiki so I could be overlooking something completely. Any help is appreciated.

mtyeh411 commented 11 years ago

Can you give me the configuration of your wiki from Special:Version (version of MediaWiki, PHP, and any relevant extensions)? Does this happen to be a public-facing wiki?

mtyeh411 commented 11 years ago

The most obvious check would be that you have the appropriate requires in LocalSettings.php.

jacepp commented 11 years ago

This project I am doing, will be a public-facing wiki but as of right now there isn't really anything on it besides the bare minimum.

As for the requires in LocalSettings.php I have require_once( "$IP/skins/mediawiki-bootstrap/bootstrap.php");

Product and Version MediaWiki 1.18.5 PHP 5.3.10 (apache2handler) MySQL 5.5.20-log

Skins Bootstrap Matt Yeh

mtyeh411 commented 11 years ago

I forgot to ask whether you checked out each of the submodules via recursive git clone or submodule update. Check the README for instructions. I'm closing this out as it has been largely inactive and I've been unable to reproduce the issue anywhere/haven't heard any similar issue.

dsingleton47 commented 11 years ago

@JacePP are you running MediaWiki on a Windows system? I found I had the same issue, when I previewed or loaded the skin none of the asset files were loaded.

I was able to fix it by editing bootstrap.php, changing the explode statement used here for $skinDirParts

$skinDirParts = explode( '/', dirname( __FILE__ ) );

to

$skinDirParts = explode( DIRECTORY_SEPARATOR, dirname( __FILE__ ) );

On my Windows system dirname(__FILE__) was returning the path as C:\DIR\DIR so exploding on / doesn't split the string at all.

DIRECTORY_SEPARATOR is a pre defined constant that returns the default separator for the platform.

jacepp commented 11 years ago

Yes I'm on Windows and the fix @dsingleton47 mentions worked. Thank you much.