Last modified: 2013-11-29 19:05:01 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 T58514, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56514 - CSSMin is not path-remapping for multiple 'url's
CSSMin is not path-remapping for multiple 'url's
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.23.0
All All
: Normal major (vote)
: 1.23.0 release
Assigned To: Bartosz Dziewoński
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-02 12:55 UTC by Bartosz Dziewoński
Modified: 2013-11-29 19:05 UTC (History)
19 users (show)

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


Attachments

Description Bartosz Dziewoński 2013-11-02 12:55:17 UTC
Autonym font loading causes hits to the [[Font/Autonym.ttf]] article. Incredible, but apparently true: http://stats.grok.se/en/latest30/Font/Autonym.ttf (unless the stats are wrong).

I have absolutely no idea what could be causing this. Maybe the stats are completely bonkers, or ULS does something very, very wrong. Or maybe it's a server misconfiguration issue. Either way something's incredibly broken.

(Not sure what product/component would be most appropriate, going with ULS for now.)
Comment 1 Bartosz Dziewoński 2013-11-02 12:58:49 UTC
(Also happens on other wikis. Originally reported at https://pl.wikipedia.org/wiki/Wikipedia:Kawiarenka/Kwestie_techniczne#Kiepska_czcionka_w_interwiki by WTM.)
Comment 2 Santhosh Thottingal 2013-11-02 16:24:59 UTC
I did some search in the CSS

The fontface is defined in UniversalLanguageSelector/lib/jquery.uls/css/jquery.uls.css as

@font-face {		
	font-family: 'Autonym';		
	src: url('font/Autonym.eot');		
	src: local('Autonym'),		
		url('font/Autonym.woff') format('woff'),		
		url('font/Autonym.ttf') format('truetype');		
	font-style: normal;		
}


And the RL outputs the css as:

@font-face{
	font-family:'Autonym';
	src:url(//bits.wikimedia.org/static-1.23wmf1/extensions/UniversalLanguageSelector/lib/jquery.uls/css/font/Autonym.eot?2013-10-24T17:33:20Z);
	src:local('Autonym'),
		url(//bits.wikimedia.org/static-1.23wmf1/extensions/UniversalLanguageSelector/lib/jquery.uls/css/font/Autonym.woff?2013-10-24T17:33:20Z) format('woff'),
		url('font/Autonym.ttf') format('truetype');
	font-style: normal;
}


For the truetype part, see the URL is wrong. For old browsers without woff support,  the ttf will be tried and I assume that cause the hit.

As a side note, this css was changed in master yesterday (see https://gerrit.wikimedia.org/r/#/c/93034/ and https://gerrit.wikimedia.org/r/#/c/93035/) So the fonts will be served using jquery.webfonts which takes care of URLs to font repo.
Comment 3 Bartosz Dziewoński 2013-11-02 16:57:29 UTC
Hmm. Now that you pointed the issue out, I realized that the CSS preprocessor in core MediaWiki only supports processing one url() per CSS rule. That should probably be fixed.
Comment 4 Santhosh Thottingal 2013-11-04 05:35:32 UTC
Since the ULS master changed how this css is defined, the issue remaining is with the CSS preprocessor. So changing the component accordingly.
Comment 5 Siebrand Mazeland 2013-11-04 06:54:42 UTC
To be able to assess priority: What are the current consequences for ULS and font loading?

As the impact is major, should any work-arounds be considered?
Comment 6 Bartosz Dziewoński 2013-11-04 10:38:44 UTC
(In reply to comment #5)
> To be able to assess priority: What are the current consequences for ULS and
> font loading?

Autonym font does not work in some browsers. A few million unnecessary requests per day are sent to Wikimedia servers.


(In reply to comment #5)
> As the impact is major, should any work-arounds be considered?

I think Santhosh has already applied a workaround? 

(In reply to comment #2)
> As a side note, this css was changed in master yesterday (see
> https://gerrit.wikimedia.org/r/#/c/93034/ and
> https://gerrit.wikimedia.org/r/#/c/93035/) So the fonts will be served using
> jquery.webfonts which takes care of URLs to font repo.

Or was this something else? If it fixes anything, it doesn't seem to be deployed yet (looking at the stats).
Comment 7 Bartosz Dziewoński 2013-11-09 16:47:59 UTC
Has anything been done about this from the ULS side? The stats linked in
comment 0 are still showing 2,500,000 hits daily to that false article, and
this only includes the English Wikipedia.
Comment 8 Gerrit Notification Bot 2013-11-09 18:31:12 UTC
Change 94511 had a related patch set uploaded by Bartosz Dziewoński:
Rewrite CSSMin::remap to support multiple url() values in one rule

https://gerrit.wikimedia.org/r/94511
Comment 9 Bartosz Dziewoński 2013-11-28 22:47:31 UTC
(According to the stats, the stupid requests stopped on 2013-11-15.)
Comment 10 Gerrit Notification Bot 2013-11-29 18:41:00 UTC
Change 94511 merged by jenkins-bot:
Rewrite CSSMin::remap to support multiple url() values in one rule

https://gerrit.wikimedia.org/r/94511
Comment 11 Bartosz Dziewoński 2013-11-29 19:05:01 UTC
And the root cause in core should be fixed too. Rejoice.

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


Navigation
Links