https://bugzilla.wikimedia.org/show_bug.cgi?id=30916
--- Comment #3 from Brion Vibber <[email protected]> 2011-09-16 18:08:02 UTC --- deleteBatch seems to act differently from the UI deletion... Looks like it first deletes the image, then deletes the page. If the file deletion fails, it will print a warning message... but continue on deleting the page anyway. deleteBatch also assumes that failure from File->delete will return something evaluating to false, which seems to match its doc comments... but LocalFile->delete claims it actually returns a status object. So it may be getting a status object saying it's failing, thinking that's success, and then continuing along deleting the pages anyway. So I think what's happening is: * it's failing to delete the files, and doesn't detect that fact * it is deleting the pages regardless of whether the image delete succeeds * the page delete saves a log entry * the link still shows blue instead of red because the file still exists (Note that when deleting through the web UI, you end up going through FileDeleteForm which hits the article first and then the image, IIRC. Eek! It at least attempts to roll back the page deletion, but with all the stuff we have in there these days I don't know if that actually works as expected.) Short fix should be something like: * update doc comment on File->delete to match LocalFile->delete etc * fix deleteBatch (and any other callers of File->delete) to check status objects * change deleteBatch to skip over the page if the image won't delete properly Longer fix probably involves refactoring the delete / doDelete on Article / WikiPage / ImagePage to be more consistent and handle that for us. :) -- 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
