Last modified: 2014-04-25 06:15:00 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 T60338, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58338 - ResourceLoader mangles @import urls with query strings to remove query string
ResourceLoader mangles @import urls with query strings to remove query string
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
unspecified
All All
: Highest normal (vote)
: ---
Assigned To: Bartosz Dziewoński
: code-update-regression
: 58358 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-11 18:30 UTC by Roan Kattouw
Modified: 2014-04-25 06:15 UTC (History)
8 users (show)

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


Attachments

Description Roan Kattouw 2013-12-11 18:30:33 UTC
https://bits.wikimedia.org/it.wikivoyage.org/load.php?debug=true&lang=it&modules=site&only=styles&skin=vector returns, as of 1.23wmf6:

/* MediaWiki:Common.css */
/* Gli stili CSS inseriti qui si applicano a tutte le skin */

/* Formattazione del template QuickBar */
@import url('//it.wikivoyage.org/w/index.php?title=MediaWiki:Quickbar.css&action=raw&ctype=text/css');

/* Multiline tables */
@import url(//it.wikivoyage.org/w/index.php);

/* Stili del template Babel */
@import url(//it.wikivoyage.org/w/index.php);

/* Edittools: Specialchars */
@import url(//it.wikivoyage.org/w/index.php);

etc. etc. All @import URLs except the first one are getting their query string stripped.

The most obvious suspect is https://gerrit.wikimedia.org/r/94511
Comment 1 Bartosz Dziewoński 2013-12-11 19:08:11 UTC
There are two bugs hidden here. My patch introduced neither, but exposed them both by making the regex used to detect 'url()' values more lax and thus matching the @imports that are the concern here.

The first bug is that protocol-relative URLs are not being detected and were processed as if they were paths to files.

The second bug is that even if an URL is detected, the query part is dropped.

The only reason this hasn't come up before is because the 'url()' values are used almost exclusively for background-images (and related styles), and almost all such images are pulled from Commons, which does not require any query parameters to be provided.

I'm writing a patch to fix both of these problems.


The fact that '@import url()' rule is now being considered for remapping might be an issue in theory (I honestly don't know if we should remap them), but should not be an issue in practice once we fix the two bugs above.
Comment 2 Gerrit Notification Bot 2013-12-11 20:06:27 UTC
Change 100824 had a related patch set (by Bartosz Dziewoński) published:
CSSMin: Fix remapOne() for URLs that are proto-relative or have query part

https://gerrit.wikimedia.org/r/100824
Comment 3 Andyrom75 2013-12-11 22:07:07 UTC
I don't if the patch has been already implemented or not, but the effect of the bug still persist.

To verify that everything works you can check:
1) the main page: https://it.wikivoyage.org/wiki/Pagina_principale
2) One generic article with banner: e.g. https://it.wikivoyage.org/wiki/Firenze
Comment 4 Gerrit Notification Bot 2013-12-11 22:07:30 UTC
Change 100918 had a related patch set uploaded by Jforrester:
CSSMin: Fix remapOne() for URLs that are proto-relative or have query part

https://gerrit.wikimedia.org/r/100918
Comment 5 Gerrit Notification Bot 2013-12-11 22:11:33 UTC
Change 100824 merged by jenkins-bot:
CSSMin: Fix remapOne() for URLs that are proto-relative or have query part

https://gerrit.wikimedia.org/r/100824
Comment 6 Bartosz Dziewoński 2013-12-11 22:13:40 UTC
Andy, the bug has been fixed, but the fix has not yet been deployed. I think James and Roan committed themselves to getting it deployed today.
Comment 7 Kunal Mehta (Legoktm) 2013-12-11 23:44:55 UTC
*** Bug 58358 has been marked as a duplicate of this bug. ***
Comment 8 Gerrit Notification Bot 2013-12-12 00:08:42 UTC
Change 100918 merged by Catrope:
CSSMin: Fix remapOne() for URLs that are proto-relative or have query part

https://gerrit.wikimedia.org/r/100918
Comment 9 Roan Kattouw 2013-12-12 00:35:43 UTC
This is deployed now, and it seems to be fixed by the looks of https://bits.wikimedia.org/it.wikivoyage.org/load.php?debug=true&lang=it&modules=site&only=styles&skin=vector&*

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


Navigation
Links