Last modified: 2011-08-24 21:51:03 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 T28486, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26486 - Shut up filemtime() warnings in ResourceLoader (and possibly other warnings related to nonexistent files as well)
Shut up filemtime() warnings in ResourceLoader (and possibly other warnings r...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.17.x
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Roan Kattouw
:
: 29207 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-29 21:54 UTC by Roan Kattouw
Modified: 2011-08-24 21:51 UTC (History)
8 users (show)

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


Attachments

Description Roan Kattouw 2010-12-29 21:54:40 UTC
We don't check file existence prior to calling filemtime(), and possibly other functions operating on files as well. This causes PHP warnings to be thrown for nonexistent files. These are nicely caught and displayed in a comment so they don't mess up CSS/JS code, but they do still spam server logs, so we should avoid them.
Comment 1 Mark A. Hershberger 2011-01-29 01:17:02 UTC
Since you gave this to yourself, Roan, did you get it done?
Comment 2 Roan Kattouw 2011-01-29 01:18:04 UTC
(In reply to comment #1)
> Since you gave this to yourself, Roan, did you get it done?
Not yet, no, but it's not a blocker.
Comment 3 Mark A. Hershberger 2011-01-29 14:39:25 UTC
(In reply to comment #2)
> Not yet, no, but it's not a blocker.

I wasn't worried that it is a blocker, but it had been a month and I just didn't want to see this disappear.  Thanks for the reply :)
Comment 4 Dmitriy Sintsov 2011-05-06 10:42:46 UTC
[Fri May 06 14:04:24 2011] [error] [client 10.1.1.119] PHP Warning:  filemtime(): stat failed for /var/www/wiki/farm117/skins/common/password.css in /var/www/wiki/farm117/includes/resourceloader/ResourceLoaderFileModule.php on line 363, 

[Fri May 06 14:04:24 2011] [error] [client 10.1.1.119] PHP Warning:  filemtime(): stat failed for /var/www/wiki/farm117/skins/common/password.js in /var/www/wiki/farm117/includes/resourceloader/ResourceLoaderFileModule.php on line 363, 

max( array_map( 'filemtime', $files ) ) is nice, however it really does not check for file existence.

What is password.css and password.js, by the way?
Comment 5 Roan Kattouw 2011-05-06 10:48:26 UTC
(In reply to comment #4)
> What is password.css and password.js, by the way?
Something with password strength checking, don't quite remember. The feature was pulled out of the 1.17 branch but apparently the module declaration was left in. It was just being useless and spewing warnings so I killed it in r87534.
Comment 6 Dmitriy Sintsov 2011-05-07 18:29:18 UTC
I've updated from /branches/REL1_17/phase3/ and now it gives me a more severe error (probably unrelated, but...)
[Sat May 07 22:26:39 2011] [error] [client 213.187.118.145] PHP Fatal error:  Class 'CSSMin' not found in /var/www/wiki/farm117/includes/resourceloader/ResourceLoaderFileModule.php on line 504, 

Something is really broken, either class is renamed or missing. I have php 5.3.6, it should be quite stable.
Comment 7 Dmitriy Sintsov 2011-05-07 18:34:45 UTC
That wiki also has latest stable Semantic MediaWiki 1.5.6 and Extension:Poem from trunk, if that is relevant.
Comment 8 Dmitriy Sintsov 2011-05-08 06:29:06 UTC
Updated again, now it is fixed. I didn't expect such untested revision, however.
Comment 9 Sam Reed (reedy) 2011-05-30 12:02:39 UTC
*** Bug 29207 has been marked as a duplicate of this bug. ***
Comment 10 Roan Kattouw 2011-08-14 09:06:15 UTC
Fixed in r94433. There is one warning left, but that's due to a PHP bug; see the commit summary for more information.
Comment 11 Brad Will (tmbw.net) 2011-08-24 13:09:48 UTC
In my install, I have deleted some of the older skins (modern, chick, and simple).  I'm getting errors in my error log about main.css and print.css for these skins, even though I have listed them in $wgSkipSkins.  

Will this fix address that scenario as well?
Comment 12 Krinkle 2011-08-24 21:51:03 UTC
(In reply to comment #11)
> In my install, I have deleted some of the older skins (modern, chick, and
> simple).  I'm getting errors in my error log about main.css and print.css for
> these skins, even though I have listed them in $wgSkipSkins.  
> 
> Will this fix address that scenario as well?

No, you should not remove those files. Adding them to $wgSkipSkins is enough to stop users from using them, removing them from the harddisk will and should throw errors.

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


Navigation
Links