Last modified: 2014-06-23 16:07:08 UTC
Our wiki has some extra extensions now, but this problem existed from the very beginning, so it should be a problem in MediaWiki itself. In my lab PC, when the wiki is loaded in Chrome, it's fine, but when it is loaded in firefox, it is as there is no loaded style, and the page is plain text with links. In my home PC, it actually works fine in firefox, but in chrome, it is again plain text. for some reason, the whole style is not being loaded in some situations. Note that this problem is consistent, by which I mean, if it is not loading properly in firefox in my lab PC, it continued not loading properly in firefox in my lab PC. In other words, this is not caused by a temporary server problem or anything of similar source.
I discovered that this happens because "www." doesn't exist at the beginning of URL's. If the links start with "http://www." then everything works fine, but if the URL's are like "yyy.com" or "https://yyy.com" then it won't load the style.
Hi mheydari. > so it should be a problem in MediaWiki itself. It might also be the server configuration or anything else. To me this does not sound like something is wrong in the code of MediaWiki (a so-called "bug"), but instead like a support request (how to change settings, questions how to do something, etc.). As bugzilla.wikimedia.org is only for specific bug reports and enhancement requests, please use https://www.mediawiki.org/wiki/Project:Support_desk to get help for this support request. Thanks!
I Don't agree. This problem is reported if you search for it in Google by other people. If other people have the same problem, it is apparently a problem with MediaWiki. Apparently, it has been there as soon as load.php is introduced to MediaWiki, which is quite a new addition. Perhaps, its effect is not fully understood yet. I don't think this is a resolved or invalid bug.
(In reply to comment #3) > I Don't agree. This problem is reported if you search for it in Google by > other people. Links highly welcome - I'm happy to be proven wrong. > If other people have the same problem, it is apparently a problem with > MediaWiki. Or some custom problem of webspace or internet access providers... So let's investigate.
Which MediaWiki and PHP versions is this about? (In reply to comment #1) > I discovered that this happens because "www." doesn't exist at the beginning > of URL's. > If the links start with "http://www." then everything works fine, but if the > URL's are like "yyy.com" or "https://yyy.com" then it won't load the style. Which URLs? Inside Mediawiki pages? Or the base URL where the MediaWiki installation is hosted at? > If other people have the same problem, it is apparently a problem with > MediaWiki. http://www.mediawiki.org/wiki/Thread:Project:Support_desk/CSS_is_not_loading_properly and http://stackoverflow.com/questions/14245442/my-mediawiki-site-wont-serve-stylesheets-as-text-css and http://osdir.com/ml/mediawiki-l/2009-04/msg00116.html imply Apache configuration tweaks instead.
PHP is 5.3.27. I can change it for the wiki page to 5.2.17, 5.4.17, 5.2.17, 5.1.6, 5.0.5, and 4.4.9. MediaWiki is 1.21.1 Note that this problem does not happen to all browsers. One browser can work fine while the other doesn't. A few similar problems and their solutions are as follows. I tried using the same solutions but none worked. http://www.mediawiki.org/wiki/Thread:Project:Support_desk/CSS_is_not_loading_properly http://www.mediawiki.org/wiki/Thread:Project:Support_desk/New_installed_MediaWiki_looks_%22a_little_weird%22_-_no_images_at_all_only_text_and_links http://stackoverflow.com/questions/14245442/my-mediawiki-site-wont-serve-stylesheets-as-text-css http://stackoverflow.com/questions/12119443/mediawiki-page-is-not-appearing-properly http://forums.fedoraforum.org/showthread.php?t=227678
There seems to be tweaking solutions that are not universal enough. I tried those redirecting solutions but none worked for my case. Note that, right now, an extra extension is installed, but the problem existed from the beginning anyways. I will send the link to you directly.
You should have a single canonical URL form. Either: http://www.foo.com/ or http://foo.com/. Trying to have both is annoying and bad practice. Choose one or the other and configure your Web server to 301 on requests to the non-canonical form. For example, if you pick "www.", every URL in the form of http://foo.com will 301 (permanently redirect) to http://www.foo.com. You can verify that this works with simple cURL requests. Once you pick a canonical form of your URL, ensure that $wgServer inside LocalSettings.php knows what it is. I don't think there's a valid bug here. I think the inconsistent behavior you're seeing is that certain browsers are smart and try to guess the URL you intended in certain situations (they know that sysadmins forget to configure www. vs. no-www access). But if you still think there's a valid bug in MediaWiki [templates?] here, please explain further. :-)
Problem solved. The page doesn't have several canonical URL's anyways. The server was set to http://foo.com I just changed $wgServer to to http://www.foo.com, and now it works all fine. My summary is that, it is fully compatible with http://www.foo.com, but not really with http://foo.com
Changing from FIXED to INVALID, as no codefix was required but as it was a configuration issue. Glad you found the reason (and thanks MZMcBride for the help)!