Page MenuHomePhabricator

OutputPage looks for wikibits.js, even if skins content is elsewhere.
Closed, InvalidPublic

Description

Author: jwm

Description:
I'm using a $wgStylePath set to an absolute URL, so I can place static media on a separate domain. My original deployment scripts placed skins/*.php on the mediawiki serving domain and the subdirectories on the static, but that resulted in this error:

Warning: filemtime() [function.filemtime<]: stat failed for /home/cffc/webapps/htdocs/w/skins/common/wikibits.js in /home/cffc/webapps/htdocs/w/includes/OutputPage.php on line 301

This looks like a new feature designed to force reloading of some media components if the file has changed, which seems to be half baked — only wikibits.js triggers this code path; ajax.js and the skin related media is unaffected — and duplicates what a properly configured web server should be capable of doing by itself.

I would prefer a move towards better support for serving static media on separate domains, where far future expiry times plus the query argument revision should be sufficient to trigger a cache update.

(Though one revision flag for the mediawiki common media, and a per skin revision would be a better combination.)


Version: 1.16.x
Severity: minor

Details

Reference
bz22331

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:47 PM
bzimport set Reference to bz22331.
bzimport added a subscriber: Unknown Object (MLST).

Which version of MW are you using? What's on OutputPage.php line 301? The bug was filed against version 1.16-svn, but I only see a brace on OutputPage.php line 301 in r61744 and versions 1.6-1.15 don't seem to contain a call to filemtime() in OutputPage.php .

jwm wrote:

I thought I was running the latest trunk, but I was wildly out of date. Looks like that code is gone completely, as the problem doesn't manifest, now.

Looking forward to 1.16 :-)