Page MenuHomePhabricator

Wikitechwiki has 4xx responses to requests for some static assets inc. poweredby_mediawiki_88x31.png and WikiEditor's button-sprite.svg
Closed, ResolvedPublic

Details

Event Timeline

Restricted Application added a project: Cloud-Services. · View Herald TranscriptMar 3 2016, 4:35 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 273410 had a related patch set uploaded (by Alex Monk):
Add public-wiki-rewrites to wikitech

https://gerrit.wikimedia.org/r/273410

Krenair claimed this task.Mar 3 2016, 5:07 PM

After that patch we now get 400 Invalid request

This involves w/static.php in operations/mediawiki-config

Jdforrester-WMF renamed this task from 404 poweredby_mediawiki_88x31.png when viewing wikitech to Wikitechwiki has 4xx responses to requests for some static assets inc. poweredby_mediawiki_88x31.png and WikiEditor's button-sprite.svg.Mar 4 2016, 6:33 PM
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF added a subscriber: Krinkle.
Krinkle edited projects, added Operations; removed MediaWiki-ResourceLoader, WikiEditor.EditedMar 4 2016, 6:34 PM

Check list:

Change 275147 had a related patch set uploaded (by Krinkle):
wikitech: Remove confusing "Alias /w" that breaks static files

https://gerrit.wikimedia.org/r/275147

Krinkle added a comment.EditedMar 5 2016, 2:10 AM

Check list:

These all turn out fine, except for the patch itself. While the lines it adds are fine, it should have changed/removed a few redundant lines that are incompatible with assumptions we made based on how all other wikis are configured.

Dumping $_SERVER on wikitech for https://wikitech.wikimedia.org/w/resources/assets/poweredby_mediawiki_88x31.png shows that request URI and script name are identical:

["REQUEST_URI"]=>
string(49) "/w/resources/assets/poweredby_mediawiki_88x31.png"
["SCRIPT_NAME"]=>
string(49) "/w/resources/assets/poweredby_mediawiki_88x31.png"

On MediaWiki app servers, the latter would be /w/static.php. This most likely caused due to the odd Alias /w config on wikitech, or some other inconsistency with Apache or PHP.

scfc added a subscriber: scfc.Mar 5 2016, 4:20 PM

When I "Edit Source" a page, the buttons have no images (but still "work"); they are to the left of "Advanced":

Is this caused by this bug as well?

Change 275147 merged by Andrew Bogott:
wikitech: Remove confusing "Alias /w" that breaks static files

https://gerrit.wikimedia.org/r/275147

Change 275582 had a related patch set uploaded (by Krinkle):
mediawiki: Use [PT] instead of [L] for static.php rewrite rules

https://gerrit.wikimedia.org/r/275582

Yeah, so that was the issue.

On silver (Apache, mod_php5, Zend PHP 5.5), $_SERVER['SCRIPT_NAME'] is set to the request url unless PT (pass-through) is used for the rewrite url.

On regular app servers (Apache in front of an HHVM server), it works fine either way.

Change 275582 merged by Andrew Bogott:
mediawiki: Use [PT] instead of [L] for static.php rewrite rules

https://gerrit.wikimedia.org/r/275582

Krenair closed this task as Resolved.Mar 9 2016, 3:37 AM
Krenair removed Krenair as the assignee of this task.

Broken again (still?).

GET https://wikitech.wikimedia.org/w/resources/assets/poweredby_mediawiki_88x31.png 404 (Not Found)

Actually, I was going to re-open this task, but hard-refresh made it to work... probably the cache headers are/were unfavorable, just FYI.