Extension talk:DeleteBatch

From MediaWiki.org
Jump to: navigation, search

Contents

[edit] Deleting File Pages

The extension is great help but File pages are not properly deleted. I deleted a batch of unused file pages, but they still were listed on Special:UnusedFiles afterwards. I had to open each page again from there and click "delete all" in the file history. --Subfader 16:40, 9 March 2009 (UTC)

[edit] Unable to use this extension

I have added this extension, but no matter what I do, I am unable to see any names in the list of users. When I submit a list, I am redirected to edit the main page.

[edit] Fatal error after installation

After installation, index.php?title=Special:DeleteBatch says: Fatal error: Class 'XmlSelect' not found in C:\domains\mydomain.com\wwwroot\wiki\extensions\DeleteBatch\DeleteBatch.body.php on line 145

Anyone who knows how to solve this? Tnx! 84.31.241.145 00:51, 7 August 2009 (UTC)

Use DeleteBatch 1.1 ; 1.3 has bug with mediawiki 1.5. 90.54.112.156 10:43, 19 August 2009 (UTC)
Hi, which revision in SVN is v1.1?
Thanks!
mitchelln 16:23, 5th November 2009 (GMT)

I have found revision 52529 to work. El Sjaako 15:51, 29 November 2009 (UTC)

[edit] Does not properly delete file/page

In trying to delete an image/page using the form, entering for example:

File:Image.jpg

...and pressing the DELETE button, the following notice is returned:

"File:Image.jpg" has been deleted. See deletion log for a record of recent deletions."

If the action is repeated on the same file/image name, then the script will return:

"Omitting non-existing page File:Image.jpg."

... sar far so good. At least the script is aware of that the image or page was deleted. However, the page still exists with all it's revisions, so it does not work. I'm using the MediaWiki 1.15.1and the matching DeleteBatch for version 1.15.x. So this snapshot is definitely not working.

Are there other extensions or maintenance scripts that does the same or a similar thing? In the meantime, I'm reverting to the tedious process of manual mass deletion.....

--Yellowdog 18:29, 25 March 2010 (UTC)

Update: My misunderstanding above, this extension does not delete images, it deletes pages. Pages for images are obviously just containers for existing images and it should not work to remove Images by removing the corresponding File: pages.

I just ran this script to delete a test page and that worked fine.

I'm still looking for a way to delete a batch of images, either by an extension or maintenance script. Does anyone have any tips?

--Yellowdog 17:42, 29 March 2010 (UTC)

[edit] Solution

VitaliyFilippov 14:01, 15 June 2011 (UTC)

This is DeleteBatch's bug, the code looks like the author wanted to delete uploads together with pages, but failed to write it correctly :) Apply this simple patch:

--- extensions/DeleteBatch/DeleteBatch.body.php
+++ extensions/DeleteBatch/DeleteBatch.body.php
@@ -290,14 +290,15 @@
                        /*this is absolutely required - creating a new ImagePage object does not automatically
                        provide it with image  */
                        $art->img = new Image( $art->mTitle );
+                     $art->delete();
                } else {
                        $art = new Article( $page );
+                     $art->doDelete( $reason );
                }
 
                /* what is the generic reason for page deletion?
                   something about the content, I guess...
                */
-             $art->doDelete( $reason );
                $db->commit();
                return true;
        }

[edit] Is this mostly used for combating vandalism/spam/banned users or for doing other kinds of maintenance?

I was thinking of creating an Extension:BlankBatch for use in blanking large numbers of nonsense articles and such created by malicious users on wikis that use Extension:PWD and have a policy of blanking such pages rather than deleting them, but wasn't sure if this tool is really used for combating that kind of thing. I've mostly used DeleteBatch for fixing issues related to outdated templates. Tisane 08:25, 31 March 2010 (UTC)

[edit] Partially compatible with MW 1.16.0

Uploading a file of a list of pages to delete does not work with MW 1.16.0. Is anyone else having this issue? Thanks in advance. --Dgennaro 17:06, 11 August 2010 (UTC)

Affirmative. This method of indicating the pages to delete does not work for me with MW 1.16.0 and 1.16.1 too. Cheers --[[kgh]] 23:05, 16 January 2011 (UTC)
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox