Last modified: 2014-10-22 08:49:02 UTC
When MediaWiki is moved (physically on-disk that is, the web-facing paths are not relevant in this case) the ResourceLoader cache that contains links to file paths (specifically the contents of the module_deps table) are not purged in anyway. I'm not sure what the right way to detect a purge-need is, but it's causing php errors like the following (Thanks to JasonJarde for reporting this on IRC): PHP Warning: filemtime(): stat failed for /home/user/oldpath/wiki/resources/jquery.ui/themes/vector/images/button-down-green.png in /home/user/oldpath/wiki/includes/resourceloader/ResourceLoaderFileModule.php on line 380 ...because those paths no longer exist. For now I recommended JasonJarde to manually DELETE all contents of the module_deps table and that fixes the problem. * Possibly related bugs: bug 34752 * See also https://www.mediawiki.org/wiki/Manual:Moving_a_wiki (which mentions nothing about this) Possible solutions I can think of: * Somehow detect that paths have changed * Create a maintenance script to clear this cache I'm not a fan of the latter because a move may not be the only cause for this and when possible I'd like to avoid a manual fix. Having to run a maintenance script is automated in some way, but it still requires manual intervention and knowing that that script has to be ran. ResourceLoader should be able to figure out the caching.
release is imminent.
See also bug 44524.
The simplest solution would be to add module_deps to the list of SQL caches that maintenance/update.php wipes when it runs. According to http://www.mediawiki.org/wiki/Manual:Update.php, update.php already wipes a variety of caches stored in SQL, including the other ones related to ResourceLoader. It seems that maybe module_deps should have been added to this list. Adding m along with doc changes instructing wiki admins to run update.php after a wiki migration/restore/move, this problem is solved for everyone. I think it's much more intuitive to continue to have update.php take care of the SQL cache issue in one feel swoop rather than have a separate command for module_deps.
Bump on this. This is a pretty ugly bug when dealing with wiki migrations. See my comment above on an easy fix.
Krinkle: Does the approach in comment 3 sound feasible? Daniel: If the approach gets an OK and if you feel like cooking up a patch, see https://www.mediawiki.org/wiki/Developer_access and https://www.mediawiki.org/wiki/Git/Tutorial
Yes. If update.php already cleans other tables the same way, let's just add this one to it.