Talk:AjaxBatchDelete

How to Get to Delete Form
I added this to my global.js and cleared my cache, however, I cannot find how to get to the batch delete form. Any ideas? Thanks! ~ User:Nikolaitttt
 * If you're using the Wikia skin, there should be a link in your my tools menu called "Batch Delete". If you're using monobook, it should be in the "toolbox" in the sidebar. Let me know if you can't see it. Cheers, grunny  :&#126;$ 01:17, March 13, 2012 (UTC)
 * Thanks! ~ User:Nikolaitttt

MediaWiki 1.19
Did this stop working for anyone else after their wikia was updated to MediaWiki 1.19? -Falzar FZ- 07:02, July 4, 2012 (UTC)


 * I should have read this first. Script is probably broken, or doesn't work for images. Either way I am now going to have to delete about 60 images manually. -- Noemo n  * talk * 18:54, January 26, 2013 (UTC)


 * Keep in mind that the message above by Falzar was from July of last year. From the history page, it appears that Grunny made a fix for MW 1.19 already, so I do not think the script is broken.


 * I have been using this script quite a bit in the past few weeks and months, and haven't had any problems deleting images or anything else. Are you sure you're inputting the page list correctly? Are you seeing any error messages in the JavaScript console?


 * Well, I gave it a batch of about 60 image pages, all in this form
 * http://deadspace.wikia.com/wiki/File:xxx.jpeg (the 3 x stand for 3 numbers)
 * and while it looked like it was indeed working, outputting a success message after each page was supposedly deleted, in reality nothing was deleted.
 * Didn't think to check the console log at that point.
 * Was I supposed to give it just the file name/page title? Giving it the URI made sense at that point, and if that was the issue I will feel stupid; first for not thinking it, secondly for not checking the change log and then thinking it.
 * -- Noemo n  * talk * 02:42, January 27, 2013 (UTC)
 * EDIT: Blimey. I'm off to bang my head on the wall. -- Noemo n  * talk * 02:47, January 27, 2013 (UTC)
 * EDIT 2: Returned, and went ahead and made a few modifications to the description. Off to put some ice. Cheers.-- Noemo n  * talk * 02:57, January 27, 2013 (UTC)


 * Ah, glad you got it sorted out. Now that you mention it, it is very misleading for it to claim "Deleted" even when the deletion fails. I've made an addition to the script so that it will now output a helpful error message. For example, if you put in a URI now it will say "The page you requested doesn't exist"

Sysop only?
Does this appear only for admins? I realize that only admins can delete, but will the buttons show only for them? Thanks! :) — Spike  Toronto  04:41, October 10, 2012 (UTC)


 * Yup. It shows only for them.~ 06:02, October 10, 2012 (UTC)


 * Thanks! — Spike  Toronto  00:44, December 9, 2012 (UTC)

Comments
Would this work on comments?  Babar Suhail    17:11, April 24, 2013 (UTC)


 * No this only works for whole pages. Benjaminthewill123123 19:35, April 24, 2013 (UTC)


 * It is possible to delete comments with AjaxBatchDelete, but getting the page titles is prohibitively complicated for most people. Article and blog comments have a page title of this form:

 TALKNAMESPACE:PAGENAME/@comment-USERNAME-TIMESTAMP


 * Example:
 * Go to this comment. Right-click on the date and time at the bottom of the comment and choose Copy link address or Copy link location (for Chrome/Firefox browsers).
 * Comment permalink from Step 1 is:
 * Isolate the page title:
 * The page title highlighted in green is what you would use to delete the comment.


 * Replies to comments have an even longer name:


 * Comment (reply)
 * Permalink with page title highlighted:


 * You can also get comment page titles through the MediaWiki API. For example, to see all of the comments by a particular user:
 * http://terraria.wikia.com /api.php?action=query&list=usercontribs&ucuser= Mathmagician &ucnamespace= 1 &uclimit= 100
 * This lists the most recent 100 comments by User:Mathmagician in namespace 1 (the talk namespace, i.e. article comments) on the Terraria Wiki, and you can get the page titles from the "title" listed in the API query. (Relevant parameters highlighted so you can generalize this to other users on other wikis.)
 * http://dev.wikia.com/api.php <- or search the MediaWikia API documentation for more info.

Error: Invalid token
Sometimes I just get an "Error: Invalid Token" How to fix this problem? 21:07, May 27, 2013 (UTC)

Getting error - Blank Page
This page is intentionally left blank.

When I am on the Adventure Time wiki, this does not happen on the other wikis I an admin of.

-- Bunai82 (talk) 19:33, March 17, 2014 (UTC)


 * Works for me. I see that text for a split second and then it gets replaced with the AjaxBatchDelete dialog. Have you tried clearing your cache?
 * That does bring up an interesting point though. I'm not an admin there, yet I can still see it. I wonder if it would let me delete pages too... If so, that probably needs to be fixed.


 * @Bunai82 Are you getting any js errors in your console? It's possible that there's some error in another bit of code that's preventing this script from loading. The text you're seeing is supposed to be there by default, it's normally removed as part of the script.
 * @RyaNayR: Whilst the script could potentially use a check that the user is a sysop/staff/vstf, trying to perform a delete will result in an error, it's simply not possible without having the delete right, regardless of the UI suggesting it's possible.


 * @cqm: Ah, that makes sense, I wasn't sure. I suppose it's not a big deal then, or really even needs the check in that case. Though it could display an info message saying that it can't be used without sysop/staff/vstf rights. But that would be a low priority thing.


 * @Bunai82 The error is cause by w:c:adventuretime:User:Yami Arashi/Sandbox.js, it's unrelated to AjaxBatchDelete. I'd suggest talking to the author of that page to get it fixed.

Some error
I'm not sure if HotCat is incompatible with this code or this code is missing something. During edit mode when I use the "save" button to add multiple categories, I get {"exception":{"message":"Invalid Format, defaulting to JSON","code":501}} in my wikia toolbar making the other links inaccessible. However, during normal edit mode the error message doesn't appear and batch delete works fine. This only happened now. What happened? Lia ( wall ) 17:08, September 27, 2014 (UTC)
 * That looks like an error pertaining to HotCat. I have just tested HotCat in conjunction having batch delete as well and they work fine for me. Not sure what's up. Does this affect just one page, or all for you? – Ozuzanna 01:03, September 28, 2014 (UTC)
 * It only happens every time I have to use the "save" (++) button, which then takes me to edit mode and the error code appears in the toolbar itself. But when I use the normal way, which is clicking the edit button beside the page's title to go to edit mode, the toolbar works fine. I had HotCat updated last Sept. 19, and I haven't encountered that kind of error for the past week, so I'm not sure why the error is triggered when multiple categories are added lately. But the batch delete, along with several other scripts, can still be accessed in My Tools normally, so it's not too much of an issue yet for me. It also happens in the interlanguage versions of some wikis I'm in, if that helps.  Lia  ( wall ) 04:11, September 28, 2014 (UTC)

500 error
I'm been getting "500 (Internal Server Error)" for every delete attempt. -452 (talk) 18:35, October 9, 2014 (UTC)
 * I'm not 100% familiar with error codes, but that suggests it's something wrong with Wikia's servers. If it was a bad api request, you'd still get success but the returned result would be an error with error code and information.
 * I think so, when I tried deleting some pages manually afterwards, I got a blank page. -452 (talk) 23:48, October 9, 2014 (UTC)

Delete from category
Hey, I really like this script, but it is a bit of a pain having to manually add the names of lots of articles. I was wondering if there could be an option to bulk-add pages to the list from a category? I know that Special:Export does this, and I like this feature for when I have lots of pages in a deletion candidates category. --SuperSajuuk Talk Page
 * Added autocomplete category support. Let me know if there's any issues. – Ozuzanna 10:48, October 24, 2014 (UTC)

Please keep AjaxBatchDelete/code.js.
Please do not delete the old code at AjaxBatchDelete/code.js. I have tried the new code and, for my purposes and on my machine, the old code is still vastly preferable. So, please do not delete it. Thanks! :) — Spike  Toronto  04:26, October 25, 2014 (UTC)


 * It's here to stay, but be aware that it's likely to be unmaintained in the future and may break due to wikia changes.


 * The reason I asked is that, with the old code, once one has copied and pasted the list into the batch delete window, and set the thing running, one can walk away and check back in later to review the audit trail and finish up. With the new code, one has to stay with it to cope with a constant stream of pop-up dialogue boxes. Thanks! — Spike  Toronto  07:21, November 17, 2014 (UTC)


 * I haven't used the new version, but given what SpikeToronto has said, please consider this another vote for "keep the current version".
 * Why is the current version more likely to be any more unmaintained than any other script here, and why is it marked as deprecated? I don't see the word deprecated elsewhere on this talk page, was there a discussion about this somewhere else? -452 (talk) 14:38, November 17, 2014 (UTC)


 * If these pop-ups really occur, I won't use the new version. The whole point of this script was to delete pages quickly and easily (without all the extra clicking). Not having to sit there and do extra clicking while deleting 100 files frees up time elsewhere which is why I use the script. DEmersonJMFM 04:04, November 19, 2014 (UTC)


 * Loading the version 2 on a category adds autocomplete support that the original lacked, amongst other things. If you want to use/update the original, feel free, but I won't be updating the old one due to the way it's structured to have what version 2 has. I'm sure the original won't be deleted either since it's fairly popular and probably sitting in a lot of user's global.js and such. – Ozuzanna 09:26, November 20, 2014 (UTC)


 * @Oz: The new version does have a nice interface. I think an improvement to it would be for it not to require that we confirm each time it cannot make a deletion. Generating a report, like the old one does, would allow version 2 to run unattended. What do you think? Thanks! :) — Spike  Toronto  03:18, November 26, 2014 (UTC)
 * I can do that; in fact, I originally planned on adding error screens to each of these modal scripts I made so users can get a nicer error output. It's been added.
 * @DEmersonJMFM: Apologies for the annoying popups/alerts, I didn't realize that was much of an issue until now. The new release should have a much nicer error display (see here). – Ozuzanna 12:28, November 26, 2014 (UTC)

Thanks Oz! :) — Spike  Toronto  08:00, December 2, 2014 (UTC)

Color property
Where does it get its set color for dark wikis? The error output is hard to read since it shows up as silver-ish in the modal. I'm also not sure where to look because I have no idea where it gets the value ._. I'm getting lazy having to change it manually via Inspect Element or highlighting it when an error shows up. Lia ( wall ) 10:26, November 27, 2014 (UTC)


 * Change the color with personal css. Arkondi (talk) 12:13, November 27, 2014 (UTC)


 * I go to several wikis with dark colors in their content area, though I'm not an admin in most of them. So having a personal CSS just for a short style change for each of the ones I'm an admin at is not practical for me. I'm keeping my global.css as a last resort, but then again, this problem is only for wikis with dark colors. Thanks for helping though. Lia  ( wall ) 14:33, November 27, 2014 (UTC)
 * The outer styling of the modal color is derived from the wiki's CSS. Also not sure why you're getting silver in the model, because it uses black text with a solid light pink background. – Ozuzanna 16:25, November 27, 2014 (UTC)
 * The light pink background stays the same for me probably because it's stated in the div unlike the color of the text. If the text is also following the wiki's CSS, it should've been white though, and I tried by clearing everything in the CSS but the silver text is still apparent. :/ Lia  ( wall ) 13:30, November 28, 2014 (UTC)
 * Ah right, I see what you mean now. I've stated the text color in the div to be black always. – Ozuzanna 13:38, November 28, 2014 (UTC)
 * Thank you :) Lia  ( wall ) 15:14, November 28, 2014 (UTC)

Following
Hello. I added this to my wikia, and it works splendidly. However, my Special:FollowedPages is overloaded with redlinks of the pages I deleted through it. Is there a way to avoid this? Many thanks.--User talk:JOA20 15:01, November 30, 2014 (UTC)