Last modified: 2014-06-23 16:07:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55097, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53097 - Style is not loaded in some PC's and some browsers.
Style is not loaded in some PC's and some browsers.
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.21.x
PC Windows 7
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-20 14:47 UTC by mheydari
Modified: 2014-06-23 16:07 UTC (History)
2 users (show)

See Also:
Web browser: Firefox
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description mheydari 2013-08-20 14:47:00 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.
Comment 1 mheydari 2013-08-20 15:01:39 UTC
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.
Comment 2 Andre Klapper 2013-08-21 16:30:48 UTC
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!
Comment 3 mheydari 2013-08-21 16:48:59 UTC
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.
Comment 4 Andre Klapper 2013-08-21 17:06:38 UTC
(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.
Comment 5 Andre Klapper 2013-08-21 17:13:43 UTC
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.
Comment 6 mheydari 2013-08-21 18:25:08 UTC
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
Comment 7 mheydari 2013-08-21 18:31:58 UTC
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.
Comment 8 MZMcBride 2013-08-21 18:48:30 UTC
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. :-)
Comment 9 mheydari 2013-08-21 20:40:51 UTC
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
Comment 10 Andre Klapper 2013-08-21 20:55:15 UTC
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)!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links