https://bugzilla.wikimedia.org/show_bug.cgi?id=34654

       Web browser: ---
             Bug #: 34654
           Summary: rebuildImages.php --missing halts with error upon
                    encountering any filename which it wants to rename
           Product: MediaWiki
           Version: 1.20-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Maintenance scripts
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


In function addMissingImage( $filename, $fullpath ) line 193 on
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/rebuildImages.php?view=markup
is a call to a function which isn't yet implemented:

192     # @FIXME: create renameFile()
193     $filename = $this->renameFile( $filename );

If renameFile() hasn't been written yet, we really shouldn't be calling it yet.
The end result appears to be that, as soon as the script finds one file which
fails to match checkTitleEncoding() (for instance, 'example.jpg' on a wiki
where that should've been 'Example.jpg') it stops dead in its tracks with:

PHP Fatal error:  Call to undefined method ImageBuilder::renameFile() in
.../phase3/maintenance/rebuildImages.php on line 193

That means any subsequent missing images don't even get looked at.

One possible solution would be the bug 27645 proposal of adding 'some
commandline option such as "--skip-unreadable" or similar'.

A simpler solution would be to simply comment out or remove the call to
renameFile() if (as the FIXME indicates) the function simply does not exist.

That will mean that 'example.jpg' still doesn't get renamed 'Example.jpg' but
at least the search for missing images would not grind to a screeching halt.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to