MediaWiki talk:Gadget-VisualFileChange.js/Archive/2017

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

Make VFC work on special pages

Especially on Special:Search it is very necessary. --XXN, 18:29, 7 January 2017 (UTC)

[Add.:] Cat-a-lot‎ already works on Special:Search, and that is only a simple tool for categorization, but VFC is a multi-functional powerful tool and it definitely needs such a feature. --XXN, 21:17, 7 January 2017 (UTC)

XXN, I have a JS, that creates a gallery from a performed search and saves it on some user page. This then can be used by VFC. --Arnd (talk) 19:10, 7 January 2017 (UTC)
Thanks for idea, Arnd. I think I'll try it next time when I will need such a functionality. But also I'm still waiting for a built-in feature:) --XXN, 21:17, 7 January 2017 (UTC)

 Doing… I'll try. This is probably the most complicated piece of Javascript I dare to touch. --Zhuyifei1999 (talk) 14:07, 11 February 2017 (UTC)

✓ Done Hey, it works :) --Zhuyifei1999 (talk) 18:25, 11 February 2017 (UTC)

Thank you so much Zhuyifei. A bit late I saw this, just tested - works :) --XXN, 15:53, 27 February 2017 (UTC)
This section was archived on a request by: --XXN, 15:53, 27 February 2017 (UTC)

Error API request failed

API request failed (internal_api_error_ConfigException): [WIdFZwpAMEQAACM1xzQAAABC] Exception caught: GlobalVarConfig::get: undefined option: 'InterwikiSortingAlwaysSort' <i>at Tue, 24 Jan 2017 12:15:36 GMT</i> <u>served by mw1233</u> when tried to batch DR nominate user uploads. http://imgur.com/a/eHvNO --XXN, 12:43, 24 January 2017 (UTC)

phab:T156123, should be resolved now --Zhuyifei1999 (talk) 13:27, 24 January 2017 (UTC)
This section was archived on a request by: --XXN, 15:53, 27 February 2017 (UTC)

Does not work anymore

Hi everyone, since some days the tool does not appear anymore under tool in the left panel although i did not change anything in my Aschroet/common.js. Can anyone help? --Arnd (talk) 04:43, 28 April 2017 (UTC)

I noticed the same. Very frustrating. --Jarekt (talk) 17:10, 28 April 2017 (UTC)
Works fine for me, probably related to [1], try to disable each script or gadget one by one. --Thibaut120094 (talk) 19:00, 28 April 2017 (UTC)
See also Commons:Village_pump#Quick_Delete_links_gone_in_Monobook --Zhuyifei1999 (talk) 04:13, 29 April 2017 (UTC)
For user uploads it works for me when starting VFC from Special:Contributions/$1, but not from Special:ListFiles/$1. --XXN, 23:29, 29 April 2017 (UTC)
Cannot confirm this. Interestingly, on my tablet where i use Chrome it works. --Arnd (talk) 15:36, 1 May 2017 (UTC)
In a Category VFC works when I use Chrome and does not show up when I use FireFox. It almost look to me like pages are slow to load and VFC just times out. --Jarekt (talk) 19:01, 1 May 2017 (UTC)
Works fine in Chromium but doesn't in FF (on Ubuntu) for me. — D Y O L F 77[Talk] 10:04, 3 May 2017 (UTC)

There seems to be a general problem with the Mediawiki software since also on German Wikisource users complain about not dissappeared buttons/Links etc. in the UI. --Arnd (talk) 04:57, 4 May 2017 (UTC)

Confirm too. But this link works for me.
Please note that it's not Mediawiki that is broken but a withdrawal of javascript functions that were announced several years ago. MediaWiki:VisualFileChange.js needs corrections. --Framawiki (please notify) (talk) 15:58, 4 May 2017 (UTC)

The VFC script itself is okay. The problem occurs in the scripts (eg user common.js) that invokes it --Zhuyifei1999 (talk) 16:56, 4 May 2017 (UTC)
  • In User:Zhuyifei1999/common.js you can see a hacky way how to make it work again for you, if it's not working :) Besides wrapping all things related VFC in personal user common.js inside a mw.loader.using block:
$.when( mw.loader.using( ['mediawiki.util'] ), $.ready ).then( function () {
//code here
});
Replace this code:
mw.util.addPortletLink('p-tb', 'javascript:importScript("MediaWiki:VisualFileChange.js");', 'Perform batch task', 't-AjaxQuickDeleteOnDemand');

with

$( mw.util.addPortletLink( 'p-tb', '#', 'Perform batch task', 't-AjaxQuickDeleteOnDemand' ) )
	.click( function ( e ) {
		e.preventDefault();
		importScript("MediaWiki:VisualFileChange.js");
	});

:) XXN, 14:56, 6 May 2017 (UTC)

Thanks, XXN. It works for me now again. --Arnd (talk) 12:25, 7 May 2017 (UTC)
This section was archived on a request by: Poké95 04:57, 14 May 2017 (UTC)

Gadget-ize installation process

FYI: Commons:Village_pump/Proposals#Make_VFC_installation_a_Gadget --Zhuyifei1999 (talk) 11:22, 5 May 2017 (UTC)

This section was archived on a request by: Proposal successful. Poké95 04:57, 14 May 2017 (UTC)

Help needed to restore the link

I no longer see the link in my toolbox, and would appreciate some help in getting it back. I'm not experienced in js, and it's not at all clear to me from the section above which of my pages needs editing and exactly what changes I would need to make. Is anyone able to do it for me or let me know precisely what I'd need to do? I'm using Vector skin, with Firefox. Many thanks. MichaelMaggs (talk) 03:39, 13 May 2017 (UTC)

@MichaelMaggs: what is in your browser console? I can't find anything wrong in your common.js or vector.js --Zhuyifei1999 (talk) 05:13, 13 May 2017 (UTC)
Hi @Zhuyifei1999: , thanks for the help. The console output when I'm looking at a Commons User page is here (easier to read in editing mode). I'm using FF 53.0.2 on MacOS Sierra. MichaelMaggs (talk) 07:48, 13 May 2017 (UTC)
@MichaelMaggs: could you add a ?debug=1 to your url? That number of errors is insane --Zhuyifei1999 (talk) 08:36, 13 May 2017 (UTC)
@Zhuyifei1999: I've updated the output using the URL https://commons.wikimedia.org/wiki/User:MichaelMaggs?debug=1. Errors and Warnings are on for all tabs except for Logging which also includes Info and Log. --MichaelMaggs (talk) 11:01, 13 May 2017 (UTC)
@MichaelMaggs: This one is very weird. The fatal JS error is the first output is TypeError: mw.util is undefined TypeError: mw.util is undefined, but that is not present in the second output. The majority are css-related non-fatal errors, which I can't even reproduce with the same firefox version. Did the "perform batch task" link appear when you did the second log? If so, I guess it's a race condition described in Commons:Village_pump/Proposals#Make_VFC_installation_a_Gadget #3. And if that's the case the best way is to uninstall VFC from User:MichaelMaggs/vector.js (remove first three lines, including /*jshint scripturl:false*/, but not the line after), and install it via the new gadget way described in Help:VisualFileChange.js#Step_0:_How_to_Install --Zhuyifei1999 (talk) 11:48, 13 May 2017 (UTC)
@Zhuyifei1999: The "perform batch task" link didn't appear when I did the second log. But anyway, your suggestion has worked. Thanks so much for your help! MichaelMaggs (talk) 18:08, 13 May 2017 (UTC)
This section was archived on a request by: Poké95 04:58, 14 May 2017 (UTC)

Link missing in Category name space

The toolbox link “Perform batch task” is missing in the Category name space, even though VFC may be used for categories, too. Could someone please add it? --Leyo 08:48, 30 May 2017 (UTC)

mw.util.addPortletLink is deprecated, which may cause this problem. --Steinsplitter (talk) 15:50, 31 May 2017 (UTC)
Are you sure about that? mw.util.addPortletLink is currently used in many gadgets including MediaWiki:Gadget-VisualFileChange.js. --Leyo 22:03, 31 May 2017 (UTC)
Yes. --Steinsplitter (talk) 11:06, 1 June 2017 (UTC)
+1 Concrete it is your common.js, you must put all mw.util in this load function. PS. See also in the German Technik/Werkstatt. -- User: Perhelion 11:17, 1 June 2017 (UTC)
The whole .js issue is too complex for me. Couldn't you just fix my common.js (using your new admin bits)? --Leyo 12:18, 1 June 2017 (UTC)
Ok, I'll be on this tomorrow (I'm at home not until weekend). -- User: Perhelion 22:09, 1 June 2017 (UTC)
@Perhelion: Thank you. It seems to work fine. --Leyo 08:05, 6 June 2017 (UTC)
This section was archived on a request by: Leyo 08:05, 6 June 2017 (UTC)

Reporting bugs, script revision

When VFC is started one can see on top left, that bugs and ideas should be reported to Rillke’s talk page. In view of his ongoing inactivity wouldn’t it be better to point to this page here, MediaWiki talk:VisualFileChange.js? Searching for this in script code I found BTW more Rillke mentions. Perhaps all without the authorship parts should be replaced?
The other not that important thing is, that also the script revision is shown, but not altered for longer time, though there haver been changes, at least one of them bigger (usage on search results). I could actually live without displaying this. — Speravir – 22:09, 30 June 2017 (UTC) {{Editprotected}}

✓ Done Awesome! Thank you! Steinsplitter (talk) 12:52, 1 July 2017 (UTC)
This section was archived on a request by: XXN, 17:13, 1 July 2017 (UTC)

Doesn't show the files

Hi, the tool doesn't seem to be working well - after selecting it in a category with Proceed, it either doesn't show the options in the right window but just the name of the tool, or it keeps saying in red, "An error ocurred setting up the selection dialog. ##### TypeError:vfc.$ctrs.editSummary.byteL(NOW SOMETHING INVISIBLE)is not a function" in the window on the left. Also, in the left menu there is often a red X next to "Retrieving list from server" under two green ticks. Have tried it with different categories and there is no improvement. --Cheva (talk) 08:50, 24 August 2017 (UTC)

Yeah, it's definitely broken. I posted about it at COM:VP. Guanaco (talk) 08:53, 24 August 2017 (UTC)
Thanks. I was sent to report here by the tool. --Cheva (talk) 09:15, 24 August 2017 (UTC)
This section was archived on a request by: bjh21 (talk) 21:59, 7 October 2017 (UTC)

VFC stuck at screen "determining target"

I'm experiencing an issue with VFC. It does not let me do anything as it's always stuck in the "determining target" screen after selecting the username I want to work with. Any ideas? Thanks. —MarcoAurelio 09:49, 25 August 2017 (UTC)

@MarcoAurelio: VFC's broken, and it doesn't look like a simple fix. See Commons:Village pump#VisualFileChange broken. Guanaco (talk) 09:56, 25 August 2017 (UTC)
This section was archived on a request by: bjh21 (talk) 21:57, 7 October 2017 (UTC)

Simple but helpful feature request

Hello everyone. when i am on a search result page or a category and start VFC it selects the right search type and prefills the input field. Couldn't this be also done when i am on a gallery page like Arnstadt or User:Aschroet/Bla so that Full page name is selected and the input field is filled with the current page? --Arnd (talk) 14:34, 11 November 2017 (UTC)

This section was archived on a request by: -- User: Perhelion 00:43, 20 February 2018 (UTC): done

API request failed (urlparamnormal)

When loading the gallery User:Aschroet/Bla1 into VFC and error is returned: ##### API request failed (urlparamnormal): Could not normalize image parameters for Mohave_County_Arizona_Test.svg. What is wrong with this file? Thank you for help, --Arnd (talk) 15:03, 27 September 2017 (UTC)

Reproduceable with curl:
curl -X POST -d 'format=json&action=query&prop=imageinfo%7Cinfo%7Crevisions%7Ccategories&rvprop=timestamp%7Ccontent&inprop=talkid&iiprop=url%7Csize%7Cmetadata%7Cuser%7Csha1%7Ccomment&iiurlwidth=120&iiurlheight=120&titles=File%3AMohave+County+Arizona+Test.svg&clprop=hidden&cllimit=500&iilimit=500' 'https://commons.wikimedia.org/w/api.php'
{"error":{"code":"urlparamnormal","info":"Could not normalize image parameters for Mohave_County_Arizona_Test.svg.","*":"See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."},"servedby":"mw1202"}
I'll file a ticket. --Zhuyifei1999 (talk) 17:50, 27 September 2017 (UTC)
phab:T176894 --Zhuyifei1999 (talk) 17:59, 27 September 2017 (UTC)
✓ Done @Zhuyifei1999, Aschroet, Jeff G., and Yann: Curiously Dyolf77 deleted immediately all corrupt files as I deployed the fix, from the test case Special:Contributions/Kanhaiya_sao (over 10 files). Now VFC can display corrupt files. -- User: Perhelion 00:51, 19 February 2018 (UTC)
Euhh, I did something wrong?? — D Y O L F 77[Talk] 00:56, 19 February 2018 (UTC)
Not really, you destroyed only the test case. :-P You may have another one? -- User: Perhelion 01:03, 19 February 2018 (UTC)
@Perhelion: Okay :) Will ping you when I will find something. — D Y O L F 77[Talk] 01:13, 19 February 2018 (UTC)
File:Mohave County Arizona Test.svg is still in User:Aschroet/Bla1 and VFC still can't display it for me.   — Jeff G. ツ please ping or talk to me 01:15, 19 February 2018 (UTC)
✓ Done @Jeff G.: I don't work often with VFC, is it normal if you select full page name and you must write the full page name per hand in the input!? -- User: Perhelion 01:52, 19 February 2018 (UTC)
@Perhelion: I generally don't use VFC from pages outside category and user namespaces, so I wouldn't know. My need to write the full name to test in preparation for my previous post in this section was unexpected, counterintuitive, and annoying.   — Jeff G. ツ please ping or talk to me 01:59, 19 February 2018 (UTC)
I added the prefill for this. And is the corrupt file page now working? @Jeff G.: -- User: Perhelion 02:34, 19 February 2018 (UTC)
@Perhelion: Yes, thanks, it doesn't crash VFC now.   — Jeff G. ツ please ping or talk to me 02:38, 19 February 2018 (UTC)
This section was archived on a request by: -- User: Perhelion 22:45, 28 February 2018 (UTC)

Port for use on Wikipedia

If there's any interest, enwp (and I imagine the other language Wikipedias) lack batch file processing scripts, which contributes to difficulties in clearing out old file backlogs. VFC would be a great fit if modified to work with enwp's templates and discussion forums. Would there be any interest in porting this script over? Also see discussion at w:en:Wikipedia talk:Files for discussion#Batch tool czar 16:59, 16 February 2017 (UTC)

 Support It's a good idea. Jerrykim306 (talk) 15:24, 26 February 2017 (UTC)
However, since every Wikipedia has it's on own format for XFD nominations, such an initiative to port VFC should come from them. --XXN, 10:23, 2 July 2017 (UTC)
Lack of response. I think it's up to other wikis to initiate if they want this tool. So archived.--Roy17 (talk) 15:16, 21 June 2019 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Roy17 (talk) 15:16, 21 June 2019 (UTC)

Possibly wrong replacement in the upload date

The upload date was changed under {{Uploaded with…}}. A bug? Incnis Mrsi (talk) 15:57, 18 June 2017 (UTC)

Almost certainly user error, rather than a bug. Storkk (talk) 16:31, 18 June 2017 (UTC)
I remember there was some controversies around such changes (they are intentional btw); forgot where. Some history-diggers may be able to find them --Zhuyifei1999 (talk) 22:23, 18 June 2017 (UTC)
I'll take your word for it, but I cannot immediately fathom why on earth that edit would be intentional. Storkk (talk) 23:17, 18 June 2017 (UTC)
Found it: User_talk:INeverCry/Archive_28#VFC_Edits --Zhuyifei1999 (talk) 01:35, 19 June 2017 (UTC)
That's a change in the {{Uncategorized}}, and I can almost see the point in that. This edit was a change in {{Uploaded with en.wp UW marker}}, which still doesn't make sense. Doesn't really matter though, it's not a VFC bug regardless.Storkk (talk) 09:38, 19 June 2017 (UTC)
The user in question makes an edit with a single change which he attributes to VFC whereas, according to Storkk, it has nothing to do with VFC. The edit summary that is unhelpful at best and deceptive at worst. BTW, shouldn’t the script report which namely data were altered? And the same user holds elevated privileges here, publicly boasting his huge edit counts. Something might be wrong on this site. Incnis Mrsi (talk) 14:27, 19 June 2017 (UTC)
The user actually does not hold elevated privileges here. --Steinsplitter (talk) 14:31, 19 June 2017 (UTC)
Also, the edit summary is not (intentionally) misleading. The edit was likely intended to "consolidate" files into more recent maintenance categories so that the older ones could be purged. To me, that makes little sense with this specific edit, which is why I thought it was probably user error. The rest of the edit summary is 1) what VFC was doing ("1 replacement", namely "year=2014" with "year=2015"), and 2) a notification that it was an automated edit using VFC... this portion is now a tag. Compare a similar type of edit: Special:Diff/prev/246466245. Storkk (talk) 13:00, 20 June 2017 (UTC)
Even more cleanup would have been possible. ;-) --Leyo 14:33, 20 June 2017 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Roy17 (talk) 15:16, 21 June 2019 (UTC)