MediaWiki talk:Quick-delete-code.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Installation info[edit]

To make these links work for you, please insert this into your monobook.js file:

//[[MediaWiki talk:Quick-delete.js]]
importScript( 'MediaWiki:Quick-delete.js' );

The link is so that when we can tell who is using it, and if/when we clean this script up, the method you turn it on by might change. So then we can easily update that too. --pfctdayelise (translate?) 17:14, 31 May 2006 (UTC)[reply]

After installation, press Ctrl+F5 or Ctrl+R to purge the cache and reload the new monobook interface. --Jollyroger 08:31, 4 September 2007 (UTC)[reply]

Problems[edit]

Am I the only one whom this not works for? / Fred Chess 20:32, 11 July 2006 (UTC)[reply]
You don't have it installed... copy the lines above into your monobook.js file. --pfctdayelise (translate?) 00:04, 12 July 2006 (UTC)[reply]
Aha, I should remove the "pre" tags. / Fred Chess 16:13, 18 August 2006 (UTC)[reply]

Simplify[edit]

If you make thease changes, you can get ride of one reduntant function. --Tomia 13:37, 30 July 2006 (UTC)[reply]

Can you update it then, please? pfctdayelise (translate?) 11:59, 15 August 2006 (UTC)[reply]
No i can't becouse it is protected, needs admin. --Tomia 16:09, 15 August 2006 (UTC)[reply]
I think it's been done. Alphax (talk) 07:06, 4 October 2006 (UTC)[reply]

For all[edit]

The software should be modified so that all admins get this script by default. — Erin (talk) 23:41, 15 August 2006 (UTC)[reply]

It's still buggy. User:Arnomane reported that it doesn't work for Konqueror browser. And it's not internationalised. If someone wanted to fix those things, then we could go ahead. pfctdayelise (translate?) 05:43, 16 August 2006 (UTC)[reply]
I believe it doesn't work on Konqueror because it uses document.write which is not allowed in XHTML's DOM. If document.write is replaced by the correct javascript, it should work in theory. Unfortunately, I don't know what code should be used instead, but I hope my post here will help improve this fine script.--Saoshyant 19:52, 11 December 2006 (UTC)[reply]
Err... try using a single quote instead of double quotes with document.write()? Alphax (talk) 15:37, 12 December 2006 (UTC)[reply]
It's strange Knoqueror doesn't allow it (browsers usually only restrict it if served as text/xml, not text/html). I had the code for the xhtml embedding, though i'd need to seek for it. Platonides 22:05, 18 December 2006 (UTC)[reply]

Improvement[edit]

Install is a button for "speedy delete" that would paste {{Speedywhat}} on the uploaders talk page, and one button called "tag for speedy" that would paste {{Copyvionote}} (substed) on users talk page.

Fred Chess 07:48, 31 August 2006 (UTC)[reply]

Seeing how often you've mangled {{Copyvionote}}, I'm going to make it throw the same warnings that {{Nsd}} and {{Nld}} do if you don't subst: them. Alphax (talk) 13:53, 2 October 2006 (UTC)[reply]
Good initiative, thank you. Although it looks awkward on all pages it is used: see User talk:Nioki32 for example. / Fred Chess 20:05, 2 October 2006 (UTC)[reply]
Ok, now you get a warning when you edit it. I'll work on the "speedy delete" buttons. Alphax (talk) 06:34, 4 October 2006 (UTC)[reply]

Double preferences[edit]

When I go to my preferences, the menu there is doubled. See this image. The tabs above the text (check usage, categorize, log, en) are doubled too. The problem disappears when I remove MediaWiki:Quick-delete.js out of my monobook.js. When I add it back, it reappears. I'm using IE 6.0. Does anyone know what's wrong and how to fix that? --Eleassar my talk 12:11, 7 September 2006 (UTC)[reply]

I blame IE. It works in Firefox. Alphax (talk) 12:46, 2 October 2006 (UTC)[reply]

Does not work anymore[edit]

Because of the way template:Deletion requests has been remade, the script doesn't function anymore. / Fred Chess 09:02, 9 September 2006 (UTC)[reply]

Yes, this is annoying. First I will fix the bug where hitting "nominate for deletion" doesn't edit the image page correctly. Alphax (talk) 14:52, 20 September 2006 (UTC)[reply]
(diffs needed in history) Hopefully this will now work. I'd like people to try it out and let someone know if it's still not working (clear your cache before you complain). Alphax (talk) 12:29, 21 September 2006 (UTC)[reply]
  • Good, but not perfect. Bug (The character ":" doesn't transclude)
  • It looks like the namespace and pagename will need to be encoded seperately (using wgCanonicalNamespace and wgTitle instead of wgPageName). Otherwise I'll see if I can find some sort of "urlUnEscape" function. Alphax (talk) 10:03, 24 September 2006 (UTC)[reply]
  • Also, the language selector for no source template is a good idea but it doesn't add the correct language "image source" template to the uploader's talk page. For example, it should add {{subst:image source/es|Image:Ruthn sifea.jpg}} ~~~~ if the selected language is Spanish.
Fred Chess 08:49, 24 September 2006 (UTC)[reply]

not saving vs. saving[edit]

I just added a call to this to my monobook and I guess I should have paid attention to the code before trying it as a test, but I went to test it and it actually saved all the pages. I am wondering if it would be better to let the user save everything. I didn't really mean to request deletion of an image and now I think I've created a bit of a mess. I'll work with an admin on IRC tonite to get it sorted... sorry! ++Lar: t/c 18:30, 3 October 2006 (UTC)[reply]

I'll see if I can add something to make this a user settable option. Alphax (talk) 06:34, 4 October 2006 (UTC)[reply]
Thanks for that! I'll test it again (I've added the vars you suggest to suppress the autosave) but not till I'm on IRC to have someone clean up any further messes I make. Pfctdayelise told me I could point at one of her images but forgot to say which one... :) So I'll probably point at mumbleimage again (is that a cool name or what?) ++Lar: t/c 12:22, 4 October 2006 (UTC)[reply]

nsd/(lang) and nld/(lang) bug fixed[edit]

The bug that made nsd and nld templates in others language not work (because {{subst:nld/it}} is incorrect syntax) has now been corrected. Please press "Refresh" in your browser to implement the corrections.

Fred Chess 08:25, 5 October 2006 (UTC)[reply]

They only don't work because they haven't been created yet. Check Special:Prefixindex/Template:Nld and Special:Prefixindex/Template:Nsd. However I agree that it's best to change this until the rest are created. Currently there are:
but only
so we need
and I can't be bothered looking at {{Nld}} yet. Alphax (talk) 10:11, 5 October 2006 (UTC)[reply]

Major cleanup and removal of duplication[edit]

I've just gone through this and removed quite a few duplicated functions; if anything breaks, PLEASE either revert it or let someone know on COM:AN. Thanks, Alphax (talk) 14:51, 9 October 2006 (UTC)[reply]

The carrot and the stick[edit]

I think this script should have a function to congratulate a user for uploading a nice and useful picture with the right licence. I think it would be nice to congratulate a new user (i.e. red username) but also "older" ones two for their first couple of pictures, especially if they are rare or not easily reproducable.

Also I think this script should have a function, to notify a user that the licence they have provided isn't right (as opposed to saying it has no licence) and it would prompt a parameter of the notification that tell the reason why do you think a different licence would be appropriate. Just an idea though.

Regards, --Bdamokos 12:57, 19 November 2006 (UTC)[reply]

Problem with file history[edit]

Hi all, I've got a problem in trying to use quick-delete.js. Clicking on the "No source" or "No license" links only gets me this message:

getUploader: Cannot get filehistory ... exiting

I copypasted the code snippet in my monobook.js as indicated. What did I get wrong? Jastrow (Λέγετε) 12:25, 20 November 2006 (UTC)[reply]

Which image did you try it on? pfctdayelise (说什么?) 12:38, 20 November 2006 (UTC)[reply]
Also what browser are you using? And what version? pfctdayelise (说什么?) 12:43, 20 November 2006 (UTC)[reply]
Many. I tried it first on Image:Sasha03.jpg and others from the "latest files" link, then on one of mine (Image:Banquet Euaion Louvre G467.jpg), whose history is much longer. I use Firefox 2.0 on MacOS X. Jastrow (Λέγετε) 12:45, 20 November 2006 (UTC)[reply]
No difference after the & -> & substitution... Jastrow (Λέγετε) 13:00, 20 November 2006 (UTC)[reply]
Grooh darn..... pfctdayelise (说什么?) 13:01, 20 November 2006 (UTC)[reply]
I have no problem on Firefox 2.0, W32. Alphax (talk) 07:09, 22 November 2006 (UTC)[reply]

Works for me on Firefox 1.5, W32 as well. Can you install one of the Javascript console extensions for Firefox (FireBug is what I use) and see what document.getElementById('filehistory') returns on an image description page? Alphax (talk) 07:16, 22 November 2006 (UTC)[reply]

This is what I got. Jastrow (Λέγετε) 19:46, 27 November 2006 (UTC)[reply]
>>> document.getElementById('filehistory')
<h2 id="filehistory">
That's what it's supposed to be. Are you still having the problem? What skin are you using? Any other custom Javascript? Alphax (talk) 06:25, 5 December 2006 (UTC)[reply]
I am still experiencing the problem and I have it also with FF2.0/XP. I use MonoBook and my monobook.js contains only the quick-delete snippet. Jastrow (Λέγετε) 13:49, 5 December 2006 (UTC)[reply]

This error is (also?) displayed if you want to use the script during you are on the history page of the image - you must go back to the image description page, then it works. --GeorgHH 14:21, 21 November 2006 (UTC)[reply]

That doesn't surprise me at all. No guarantee of validity on history views :P --pfctdayelise (说什么?) 14:28, 21 November 2006 (UTC)[reply]
Indeed, it will NOT work from a history tab, mainly because the upload history doesn't have anything to do with the page history (and apart from that, upload history isn't displayed in page history). Alphax (talk) 07:09, 22 November 2006 (UTC)[reply]
I think its usefull if it works on the history tab, because you must check the changes on the image before tagging nsd/nld. If on the history tab you see there are no changes than you should can use the script directly without going back to image tab. The nsd/nld links in the toolbox are displayed also on the history tab, why if you cant use them? --GeorgHH 10:18, 22 November 2006 (UTC)[reply]
If you can work out a way of getting the upload history from the history tab (short of using AJAX), you're doing better than me. Until then, I'm inclined to disable the script for history pages. Alphax (talk) 07:03, 23 November 2006 (UTC)[reply]

Language problem[edit]

Unfortunately the script has several bugs when the preferences in not set to English.

Similarly, the extra tabs, in another script, for checking usage, categorization and gallery do not work either in other languages.

You can test this by simple changing language in your setting and look at any image.

One bug is of course that the No Source tools do not work at all. Another bug is that when nominating an image for deletion, the {{Delete}} template is not added to the image (the notification and adding to log file works though).

Fred Chess 17:12, 24 November 2006 (UTC)[reply]

The problem with the extra tabs (checkusage, commonsense, galleries etc.) is a display issue; there is not enough room for all the elements to fit on the screen, even though they're present in the DOM, so they get squashed. Alphax (talk) 10:12, 26 November 2006 (UTC)[reply]

Inform the uploader when nominating an image for deletion - Bug?[edit]

When I nominate an image for deletion, the {{subst:idw|Image:image name}}~~~~ is included twice in the editform, the summary line remains blank. When I looked at the js-file I could not figure out, why it did this. All other tagging works fine for me (FF 1.5.8, WinXP) --Matt314 16:14, 25 November 2006 (UTC)[reply]

I think that was a result of Fred's recent change; it should be fixed now. Alphax (talk) 13:34, 26 November 2006 (UTC)[reply]
It does work now. Thanks for fixing! --Matt314 16:07, 26 November 2006 (UTC)[reply]

Is it possible to create shortcuts to add these templates to the image? -- Bryan (talk to me) 20:34, 22 December 2006 (UTC)[reply]

I'll put it in my rewrite. Alphax (talk) 07:08, 4 January 2007 (UTC)[reply]

Problem with file history[edit]

If a file was overwritten with an other version by a different user, the warning message is added to the talk page of the second user, not to the talk page of the original uploader. Can this be fixed? Example: Image:Betta smaragdina mating.jpg - the warning message was added to User talk:Drini but it should added to User talk:Acapella. --GeorgHH 22:05, 10 February 2007 (UTC)[reply]

I tested the nosource today on an image I had edited and ended up warning myself. Entertaining indeed, but still annoying! I believe this is another example; not sure if Bryan used the function or did it by hand, though. -- Editor at Largetalk 14:55, 2 April 2007 (UTC)[reply]
I think I used the script by then, although it is of course entirely possible that I made the mistake myself :P -- Bryan (talk to me) 17:10, 2 April 2007 (UTC)[reply]

New version adding "no permission"[edit]

I request an update of this script from User:Siebrand/monobook.js. This will added a 'no permission' button, so that we can distinguish between "a license is missing" (nld) and "a license is present, but we cannot verify or find a permission". Thanks. Siebrand 13:38, 16 April 2007 (UTC)[reply]

This will be helpful, we have many images (often tagged Copyrighted free use) with a source that give no copyright information. --GeorgHH 15:32, 16 April 2007 (UTC)[reply]
Exactly. I added this because another user reverted a 'nsd' that should have been 'npd' (which I was not aware of at that time). Once I found out about that template later on, I thought I might as well adapt the script. Currently we always post a {{no source|Image.ext}} to the user page. That can be improved... Siebrand 15:46, 16 April 2007 (UTC)[reply]

adding to default monobook?[edit]

Would it work to add this script to MediaWiki:Monobook.js? Does the script work in other browsers such as IE? Does the code need cleanup? Are there known bugs?

Fred Chess 11:23, 24 April 2007 (UTC)[reply]

I do not think there are many bugs, but I do fear the n00bs experimenting with pressing buttons that enables them to rapidly up their edit count... Call me paranoid, but IMO this tool should not be used without at least a little understanding of Commons:Licensing. Siebrand 13:13, 24 April 2007 (UTC)[reply]
I have removed the no source / license / permission buttons, keeping only the Nominate for Deletion; see MediaWiki:Quick-delete2.js; I've tried and it works (install is the same as for this script). Should be better, and safe too? / Fred Chess 14:56, 24 April 2007 (UTC)[reply]
Yeah, that sounds great. Now just hope they will not push the panic button if one click opens 3 new tabs :) Siebrand 15:12, 24 April 2007 (UTC)[reply]

There are known bugs! The technical solution evades me yet, but the better way is here: either

  1. allow full functionality for all monobook users; or
  2. allow full functionality for anyone who opts-in (via gadgets)

Or someone who knows javascript better than I could simply fix the black magic so it works. – Mike.lifeguard | @en.wb 12:10, 3 April 2008 (UTC)[reply]

wrong template on user talk[edit]

If using the No permission link, the script wrote the {{Image source}} text to the user talk. This is wrong, it must be {{Image permission}}. See Image:Ork Black metal band.jpg and User talk:Emperor666. --GeorgHH 16:41, 25 April 2007 (UTC)[reply]

I looked into the same thing last week. I cannot code well enough to fix it, though. It appears to me as if it has always been like this... Siebrand 17:30, 25 April 2007 (UTC)[reply]
I have fixed it now. / Fred Chess 19:24, 25 April 2007 (UTC)[reply]
Thank you, Fred! --GeorgHH 22:13, 25 April 2007 (UTC)[reply]

Useful addition, copyvionote[edit]

It would be useful to have a link that adds the "copyvionote" tag to the uploader's userpage (so the admin doesn't have to do it manually). It should also take a language parameter. / Fred J 15:52, 10 August 2007 (UTC)[reply]

Help! No longer working (fixed now)[edit]

Please fix this script. Because of software changes, it is no longer working. Cheers! Siebrand 23:10, 26 August 2007 (UTC)[reply]

I think this happens because of recent changes in file info table. However, I don't know how to fix it :-( --EugeneZelenko 15:55, 27 August 2007 (UTC)[reply]
Are you using the last version (not a cached one)? I had already updated it [1]. If it wasn't fixed, please specify the steps to reproduce it. Platonides 21:34, 27 August 2007 (UTC)[reply]

It's been fixed. F5 the hell out of your browser :) Cheers! Siebrand 22:35, 27 August 2007 (UTC)[reply]

Hmm...[edit]

It is my opinion that this script should merely open three edit forms and change the text, leaving the user to click the Save button. If this is not acceptable, it is my opinion that the script should be removed from the sidebar. Thanks -- 86.139.86.174 17:49, 6 September 2007 (UTC)[reply]

You can already set nfd_autosave and nfd_autosave to false in your monobook.js to avoid the auto-Save. Platonides 12:43, 7 September 2007 (UTC)[reply]

Make this tool on English Wikipedia, please?[edit]

After installing this tool, I have found it much faster to clear untagged images. As English Wikipedia has at least hundreds of untagged images, could any experienced users please also make this tool on English Wikipedia? It takes too much time clearing untagged images there without a similar tool.--Jusjih 01:17, 29 October 2007 (UTC)[reply]

OsamaK just told me on my talk page about en:User:Howcheng/quickimgdelete.js .--Jusjih 02:27, 7 November 2007 (UTC)[reply]

Translations of string constants[edit]

Shouldn't this block

if (wgUserLanguage != 'en')
{
 importScript( 'MediaWiki:Quick-delete2.js/' + wgUserLanguage );
}

include MediaWiki:Quick-delete.js/* instead? And shouldn't it be placed after the defintion of mnx_langquery? — Xavier, 12:06, 16 November 2007 (UTC)[reply]

Gadget[edit]

Now available as a gadget : MediaWiki:Gadget-QuickDelete.js. le Korrigan bla 11:04, 5 December 2007 (UTC)[reply]

Doesn't work and I don' t know why[edit]

Hi all, I'm trying to install quick-delete.js and it doesn't seem to work. I've proved with a minimalistic monobook.js (see here), repeatedly purged the cache (being connected and unconnected) and I don't get any extra button in the toolbox. My browser is Firefox (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11). Have I missed anything regarding preferences in Commons or configuration in Firefox. Any help would be appreciated. Thanks --Ecemaml (talk to me/habla conmigo) 06:29, 17 December 2007 (UTC) PS: BTW, I've also tested with IE and it didn't worked (although maybe with IE not working is the right thing)[reply]

Please, forget this message. I'm sort of moron not being able to deal with the Commons interface. Sorry --Ecemaml (talk to me/habla conmigo) 06:41, 17 December 2007 (UTC)[reply]

Todo: if multiple uploaders[edit]

For deletions, if there are more than one uploader for an image, there should be a choice of which of the uploaders should get the deletion warning. I know a similar script on English Wikipedia that allowed the user this choice. / Fred J (talk) 19:54, 7 January 2008 (UTC)[reply]

Feature request[edit]

When leaving a message for some user, please add {{Welcome}} (or other-language equivalent if chosen) when the talk page doesn't exist yet. – Mike.lifeguard | @en.wb 06:12, 1 April 2008 (UTC)[reply]

Lame question[edit]

Sorry for the lame question, but how can use this? I have the source in my monobook page and then how do I call the quick-delete function? What do I do when I find some untagged file? Sorry, but I have never worked with such stuff before. Thanks! --Chech Explorer 20:56, 8 May 2008 (UTC)[reply]

The link to tag images and notify users is in the toolbox. – Mike.lifeguard | @en.wb 14:24, 25 May 2008 (UTC)[reply]

Doesn't work![edit]

Hello! Quick delete doesn't work with my account, I tried more than one computer, and Firefox 3.0RC and Internet Explorer. I tried to press "Ctrl+F5", but it wasn't working. I'm using it on my monobook.js. BTW, I use another scripts well like 'UserMessages.js'. Any ideas?--OsamaK 16:56, 24 May 2008 (UTC)[reply]

Issue has been fixed on the IRC. --Kanonkas(talk) 17:30, 24 May 2008 (UTC)[reply]
Yeah, thanks PatríciaR, look at this edit.--OsamaK 17:55, 24 May 2008 (UTC)[reply]
What's wrong with importScript? --Dschwen 04:36, 25 May 2008 (UTC)[reply]
have no idea, ask a developer, but it wasn't working!--OsamaK 13:19, 25 May 2008 (UTC)[reply]
There is nothing wrong with importScript. I think this is the likely culprit (has since been reverted). – Mike.lifeguard | @en.wb 14:23, 25 May 2008 (UTC)[reply]

lang?[edit]

Can someone please fix this so it doesn't try to subst translations instead of the actual template? For example: it does {{subst:nsd/xx}} instead of {{subst:nsd}}. The "lang?" should only affect the user talk message. Also, I guess there was re-merging of the script but it still calls Quick-delete2.js for no reason. Rocket000 (talk) 15:36, 4 August 2008 (UTC)[reply]

Really the whole script should be consolidated into just one, and refactored to avoid this sort of thing. Well beyond my abilities, I assure you.  — Mike.lifeguard | @en.wb 16:05, 4 August 2008 (UTC)[reply]
It's getting to be boring to use the script, then have to fix images by hand anyway :( but unfortunately I don't know how to fix it either... Patrícia msg 15:15, 2 September 2008 (UTC)[reply]
I tried, please revert in case I broke it. Regards, -- ChrisiPK (Talk|Contribs) 21:22, 20 November 2008 (UTC)[reply]

"Error: QuickDeleteEnhanced is not defined"[edit]

{{editprotected}}

The recent changes by Lupo to this script are causing JavaScript errors and preventing other scripts from running on Firefox at least. See report at Commons:Village pump#Check usage removed?!?. I believe a possible fix would be to test for window.QuickDeleteEnhanced instead of just QuickDeleteEnhanced. —Ilmari Karonen (talk) 04:56, 7 January 2009 (UTC)[reply]

✓ Done - let me know if this doesn't fix the error.  — Mike.lifeguard | @en.wb 05:33, 7 January 2009 (UTC)[reply]
Thanks, Mike. But I don't quite understand where the problem comes from. I thought the expression foo in if (foo) { ... } simply evaluated to false if foo was not defined. So, where did this error message come from? Any clues? Lupo 07:54, 7 January 2009 (UTC)[reply]
I'm not really sure why it does that, but the behavior is documented at https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Variables, which says that "an attempt to access an undeclared variable will result in a ReferenceError exception being thrown". I suppose the idea is to catch bugs caused by mistyping the variable name, but I don't really understand why it's a fatal error rather than just a warning. Anyway, the easiest workaround I know of is to access possibly undeclared global variables explicitly via the window object. —Ilmari Karonen (talk) 08:42, 7 January 2009 (UTC)[reply]
That link also says "The undefined value behaves as false when used in a boolean context." I'm still puzzled... if that always raised an exception, we'd get exceptions throughout all our JS. Or wait... just if (foo) { ... } indeed is an access of foo... maybe use if (!!foo) { ... } to force a "boolean context"? Lupo 08:54, 7 January 2009 (UTC)[reply]
You're missing the distinction between "undefined" and "undeclared". See the first code example in the "Evaluating Variables" section. —Ilmari Karonen (talk) 08:59, 7 January 2009 (UTC)[reply]
You're right. In my defense I'll point out that typeof (doesntExist) == 'undefined' :-)[2] (Which makes sense, because it's about the type of something undeclared. But still, I think that's the source of my confusion.) Hence the proper way to clean this up would be to add if (typeof (QuickDeleteEnhanced) == 'undefined') var QuickDeleteEnhanced = false; to the top of the file. That "window." prefix is a bit of an obscure fix... Lupo 09:13, 7 January 2009 (UTC)[reply]

no lang?[edit]

Hello,

I noticed that the lang links disappeared. Now all users get messages in English, whereas before we could choose a language. Can't we have the lang feature back? Patrícia msg 19:02, 1 March 2009 (UTC)[reply]

Hi Patricia, message templates are now autotranslated, so they are displayed in the interface language of the user. Try viewing talk pages with ?uselang=fr, ?uselang=de, ?uselang=es etc. and you will see the message changes. Regards, -- ChrisiPK (Talk|Contribs) 20:42, 1 March 2009 (UTC)[reply]
Ah, sorry, I didn't notice that, it seems I'm too technologically challenged :D, thanks! Patrícia msg 20:53, 1 March 2009 (UTC)[reply]

Seems to be broken after recent code update[edit]

Quick-delete became slow delete, auto safe seems to have stopped working. Multichill (talk) 12:37, 9 July 2009 (UTC)[reply]

Not for me. And I didn't make any recent update. The last change in any of the relevant files dates back to May 18, 2009. Besides, a little more info would be helpful. If you mean that the opened tabs remain open for quite a while before they are finally closed, that just indicates that the servers are slow to respond. I have noticed some quite severe sluggishness of our servers for the past month or so in other areas, particularly image loading. Lupo 12:46, 9 July 2009 (UTC)[reply]

Quick-delete gadget not saving the pages[edit]

Quick-delete gadget not saving the pages The quick delete gadget edits the picture description page and the uploader's talk page but stops short of saving them. So that I had to click on the "save" button manually.

Is it possible to make the auto-save function work again ?

Teofilo (talk) 06:06, 16 July 2009 (UTC)[reply]

Diffs : user talk image description page. Teofilo (talk) 06:09, 16 July 2009 (UTC)[reply]

The "nominate for deletion" tool has the same bug, excepting the request log ( Commons:Deletion requests/2009/07/16 ) where auto-save was working fine. Teofilo (talk) 06:33, 16 July 2009 (UTC)[reply]

Strange. It works flawlessly for me. What browser are you using? What gadgets have you enabled? Does it just not save, or does it give you some red box somewhere on the page saying something about a token having expired?
Might also be related to the recent server problems. There were no recent changes to these scripts. If the servers are slow, the edit tokens used by these script might expire, and then it wouldn't save. But you'd see that red box...
Lupo 06:38, 16 July 2009 (UTC)[reply]
Firefox 2.0.0.20 (Firefox is set to ask me to confirm any update, so that I would have known if Firefox had performed an update recently) - I don't see these red boxes - Yesterday everything seemed to be OK (and the servers had probably bigger troubles yesterday than today). I've just tried again 2 minutes ago on User talk:Rtafa ppp and File:เสียดินแดน ร.ศ.112.jpg for a speedy delete request, and I had to save manually. Teofilo (talk) 07:24, 16 July 2009 (UTC)[reply]
My gadgets are
  • chooseresolution - just added 2 minutes ago - and works fine, by the way, thanks)
  • tineye
  • hotcats
  • catalot
And that's all. Teofilo (talk) 07:32, 16 July 2009 (UTC)[reply]
Don't have an FF2 right now, will try later. Lupo 07:53, 16 July 2009 (UTC)[reply]

Something important I should have noticed earlier : instead of saving the page, the script is providing me with a show changes preview. Teofilo (talk) 08:02, 16 July 2009 (UTC)[reply]

Does it happen always or just from time to time? Lupo 08:16, 16 July 2009 (UTC)[reply]
Always. The only exception is page Commons:Deletion requests/2009/07/16 where auto-saving is always functionning correcly. Teofilo (talk) 09:41, 16 July 2009 (UTC)[reply]

I have a good news : I made a deletion request a few minutes ago, and the bug had disappeared. Teofilo (talk) 17:36, 6 December 2009 (UTC)[reply]

Update : a similar looking problem is being reported by several users at Commons:Village pump#Problems with "Nominate for deletion" function. Teofilo (talk) 11:22, 8 April 2010 (UTC)[reply]

I've seen it. I still have no clear idea what causes it. Maybe something with including document.cookie in the token in MediaWiki:QuickModify.js and MediaWiki:QuickMod.js. I haven't figured out yet what exactly causes this problem, nor how to fix it such that things don't break if people's browsers still have an old version of MediaWiki:QuickMod.js cached... Lupo 11:38, 8 April 2010 (UTC)[reply]
This looks very much like the same issue that I fixed with these edits to my license migration script. Basically, the problem is that the new wikiEditor code sets some cookies with the path "/w/", causing document.cookie to look different when editing than on normal page views.
Anyway, another issue I noticed while fixing it was that, due to MediaWiki's use of HTTPOnly cookies, document.cookie as visible to JavaScript actually won't contain much randomness for most users. Hence, I ended up deliberately generating a pseudo-random token and saving it in a specific cookie. —Ilmari Karonen (talk) 12:53, 8 April 2010 (UTC)[reply]
Yeah, that was my line of thinking, too. But the tricky part is how to migrate without breaking it. People will have an old MediaWiki:QuickMod.js cached, so if I change MediaWiki:QuickModify.js to use something else, the whole mechanism won't save for most users anymore. Lupo 13:46, 8 April 2010 (UTC)[reply]
That'll be inevitable, I think. Anyway, I figured there really should be a reusable solution for this problem, so I wrote a quick draft of such a thing at User:Ilmari_Karonen/NoCSRF.js. Comments and improvements are welcome. —Ilmari Karonen (talk) 15:46, 8 April 2010 (UTC)[reply]
Good idea. I've left some comments there. Lupo 06:37, 9 April 2010 (UTC)[reply]

Conflict with DRBot on request log page layout[edit]

Whenever I use the "nominate for deletion" link, DRBot edits my edit to remove the new line created by the script : diff.

I don't know which is better, with or without a new line, but this conflict is creating useless edits in the log's history.

Teofilo (talk) 11:22, 16 July 2009 (UTC)[reply]

Bug when notifying users[edit]

I just wanted to notify Launchballer of a copyright violation, but the tool gave the following error: "The requested page title was invalid, empty, or an incorrectly linked inter-language or inter-wiki title. It may contain one or more characters which cannot be used in titles." Anyone able to find out what's wrong there? --The Evil IP address (talk) 14:03, 6 August 2009 (UTC)[reply]

Something certainly went wrong their. It looks like your deletion notice got double-encoded, and I suspect that may be what happened to the talkpage edit link too. If this was a bug in our JS, I'd start looking for it somewhere in QuickModify.js, but I don't see any recent changes to that or any related scripts that might've caused this. Thus, I'm inclined to suspect it might be something in your browser instead. (Just by chance, you aren't using Firefox with the NoScript add-on, are you? I've lately noticed its XSS protection feature sanitizing Commons URLs a bit overzealously on a few occasions.) —Ilmari Karonen (talk) 14:39, 6 August 2009 (UTC)[reply]

Adding discussion to the wrong date[edit]

See Special:Undelete/Commons:Deletion requests/2006/02/08, where the script added a new deletion request today. --The Evil IP address (talk) 22:08, 21 February 2010 (UTC)[reply]

I'd say that user's computer's clock was off by some four years. Hm. With the current setup, there's no easy way around this, given that the current date is not available in the page somewhere (and that would probably kill caching anyway). Lupo 23:45, 21 February 2010 (UTC)[reply]
There's no way to grab the time from the server? Like with a magic word or timestamp or... caching would be an issue? Rocket000 (talk) 23:14, 22 February 2010 (UTC)[reply]
Not without an API call. I can get it through a query like this (the "starttimestamp" result), but until now that whole system did well without API calls. Also, the page in this query would need to be a page that's guaranteed to be unprotected; maybe the village pump. (Unfortunately, meta=siteinfo does not report back the server time.) I'm not sure it's worth adding the complexity of doing this for what appears to rather rare occurrences. Lupo 07:01, 23 February 2010 (UTC)[reply]
Also see bugzilla:22240. The fix is not live yet here. If it were, siteinfo would indeed report the server time. Lupo 07:16, 23 February 2010 (UTC)[reply]
To be clear: there is the magic word CURRENTTIMESTAMP. But including that in some way on all pages would probably really kill the server-side caching. Using action=parse, one could use it to get the server time without waiting for the fix for bug 22240 to be deployed. Lupo 07:19, 23 February 2010 (UTC)[reply]

Omitted deletion log entry[edit]

I posted a question at Commons talk:Deletion requests#Glitch in automated_nominations? --InfantGorilla (talk) 11:14, 9 June 2010 (UTC)[reply]

No license is swaped with no permission[edit]

In the menu on the left side, clicking "No license" puts "npd" template, and other way round for "No permission".

this is for "No license": javascript:AjaxQuickDelete.insertTagOnPage("{{subst:npd}}","Missing%20permission","{{subst:image%20permission|1=%FILE%}}","Please%20send%20a%20permission%20for%20%FILE%%20to%20[[COM:OTRS|OTRS]]","undefined");
and this is for "No permission": javascript:AjaxQuickDelete.insertTagOnPage("{{subst:nld}}","Missing%20license","{{subst:image%20license|1=%FILE%}}","%FILE%%20does%20not%20have%20a%20license","undefined");

both obtained from the menu on the left with the "copy link" option in my browser. Masur (talk) 17:06, 26 July 2010 (UTC)[reply]

the same problem from me DingirXul (talk) 17:14, 26 July 2010 (UTC)[reply]