MediaWiki talk:Gadget-citations.js/Archive 1

Protected edit request on 12 July 2014
Hello!

Could someone make these changes? Helder.wiki 00:07, 12 July 2014 (UTC)
 * ✅ Ruslik_ Zero 19:37, 18 July 2014 (UTC)

Updated URL needed 2014
This tool has moved. See User_talk:Citation_bot. Can someone please update the URL, if necessary, in this page, so that the Gadget will work?

I may have misdiagnosed the problem, but I believe a new URL is all that is needed. – Jonesey95 (talk) 23:41, 17 January 2014 (UTC)
 * ✅ Legoktm (talk) 06:32, 19 January 2014 (UTC)

Protected Edit 2017
Please add the ?slow=1 to the URL i.e. https://tools.wmflabs.org/citations/gadgetapi.php?slow=1 See https://en.wikipedia.org/wiki/User_talk:Citation_bot#Inline_.22Citations.22_button_does_not_work_as_well_as_calling_the_bot_through_link for a discussion of why this is a good idea. Basically the bot should do the same thing however it is called. AManWithNoPlan (talk) 00:02, 22 September 2017 (UTC)
 * When the bot writer (Smith) asks for the edit, you know it's good. AManWithNoPlan (talk) 03:40, 25 September 2017 (UTC)
 * Please confirm the change that is required, and where that change is to be made. I see no mention of slow=1 in the link you provided, and I do not see a link to gadgetapi.php in this script. &mdash; Martin (MSGJ · talk) 12:24, 25 September 2017 (UTC)
 * the script calls the bot two different ways. Please change https://tools.wmflabs.org/citations/gadgetapi.php To https://tools.wmflabs.org/citations/gadgetapi.php?slow=1  The other call to the bot has it already.  AManWithNoPlan (talk) 13:05, 25 September 2017 (UTC)
 * Okay I found it. Sorry for the delay &mdash; Martin (MSGJ · talk) 14:04, 25 September 2017 (UTC)
 * It works. Thank you. AManWithNoPlan (talk) 15:01, 25 September 2017 (UTC)

Bug 2015
,, and please have a look at T107649. Multichill (talk) 21:29, 1 August 2015 (UTC)

broken url 2014
please replace /citations/ with /citations-dev/ until the old url works again. See User_talk:Citation_bot - Ihaveacatonmydesk (talk) 11:34, 25 October 2014 (UTC)

Need to change hostname
Both references to "tools.wmflabs.org/citations" need to be changed to "citations.toolforge.org"   See: https://wikitech.wikimedia.org/wiki/News/Toolforge.org. Right now, the bot is blocks, so do not expect it to work before or after (other than tool mode that used while editing a page) AManWithNoPlan (talk) 12:50, 15 June 2020 (UTC)
 * I should add that the DNS has now moved, so we are a little slow about this. Explicitly, the name and path are changing. AManWithNoPlan (talk) 14:51, 15 June 2020 (UTC)
 * Is this why it seems to have stopped working, including clicking the Citations button when using Edit source? --- FULBERT (talk) 13:15, 16 June 2020 (UTC)
 * First, the bot account is currently blocked. Secondly, URL has changed.  Thirdly, we were slow and have not updated the bot credentials.  So, this only fixes one of the three problems, but this alone will fix the edit source button. AManWithNoPlan (talk) 13:54, 16 June 2020 (UTC)
 * , Thanks! FULBERT (talk) 20:23, 16 June 2020 (UTC)
 * , I would wait until OAuth actually works on the new domain. I see reports that it doesn't under the new domain. — CYBERPOWER  ( Chat ) 20:30, 16 June 2020 (UTC)
 * You have it backwards. It does not work on the old domain.  Anyway the old domain is gone and redirects.  AManWithNoPlan (talk) 20:49, 16 June 2020 (UTC)
 * , what about the auth errors that people were getting this morning? — CYBERPOWER  ( Chat ) 20:51, 16 June 2020 (UTC)
 * What errors are you refering too? the old domain is dead anyway. AManWithNoPlan (talk) 21:25, 16 June 2020 (UTC)
 * , See this thread where claims they are getting auth errors. — CYBERPOWER  ( Chat ) 21:29, 16 June 2020 (UTC)

If they are down, then that is their failure. Oauth must be updated for the new server. This whole discusion is pointless since the old server is gone anyway. Once these edits are done, we will go from complete failure to failing because we also failed to update oauth. So, this edit is only one-third of the changes needed (the other third is the bots account is blocked) we were warned months ago to fix this and we are slow. Now our hand is forced. AManWithNoPlan (talk) 21:39, 16 June 2020 (UTC)
 * ✅ (as to the edit request). — xaosflux  Talk 23:35, 16 June 2020 (UTC)


 * Reflinks also has a problem. Whenever you try to run it, you get a security alert and if you bypass it, then it redirects you to some random website rather than filling the references.  The C of E God Save the Queen!  ( talk ) 07:35, 17 June 2020 (UTC)
 * part two of this bot translation-server reports every urls as "not found" now. AManWithNoPlan (talk) 11:33, 17 June 2020 (UTC)
 * Reflinks is now coming up with a "DNS_PROBE_FINISHED_NXDOMAIN" error message whenever you try to run it now.  The C of E God Save the Queen!  ( talk ) 07:42, 20 June 2020 (UTC)

Protected edit request - remove user name September 2019
&user="+encodeURIComponent( mw.config.get( 'wgUserName' ))

Should be just:

"

Because OAuth is now used. AManWithNoPlan (talk • contribs) 18:32, 18 September 2019 (UTC)
 * AManWithNoPlan - ✅.  ~Oshwah~  (talk) (contribs)   04:35, 21 September 2019 (UTC)

Interface-protected edit request on 16 January 2021
On line 97 change  to  ; it seems to work fine with Timeless. Perryprog (talk) 23:49, 16 January 2021 (UTC) Perryprog (talk) 23:49, 16 January 2021 (UTC)
 * ✅ added, let us know if it works for you. —  xaosflux  Talk 20:19, 19 January 2021 (UTC)
 * , everything seems to be working, thank you. Perryprog (talk) 20:50, 19 January 2021 (UTC)

RfC announce: Citation tools
There is an RfC at Wikipedia_talk:Citing_sources/Archive_50 regarding whetyer citation tools should allowed. Your input on this question is welcome. --Guy Macon (talk) 22:01, 11 November 2020 (UTC)

Protected Edit Request - but first discussion?
The phrase "Error: Citations request failed" needs improved. This can result from
 * bad wiki code causing the bot to crash - these are bugs in the bot
 * a huge/convoluted page causing the bot to crash out of memory
 * the bot is overloaded and never responded.

So, there is no easy way for the gadget to know the difference. I suggest changing the text to "Error: Citations request failed. Please try again later", or something similar. AManWithNoPlan (talk) 19:20, 11 April 2021 (UTC)
 * That seems like a fairly pointless change, IMO. If something fails, why would you not try later? &#32; Headbomb {t · c · p · b} 01:05, 13 April 2021 (UTC)
 * ❌ needs further discussion, if a consensus arises please reactivate the edit request. — xaosflux  Talk 11:06, 1 May 2021 (UTC)

Protected Edit Request - 11 April 2022
Right after: $.ajax( { Can someone add:        timeout: 600000, // thousandths of a second, so 10 minutes, which is basically infinite This will reduce failures.  AManWithNoPlan (talk) 22:08, 11 April 2022 (UTC)
 * Unless that seems too big, or the default is actually infinite and it is something else timing out. AManWithNoPlan (talk) 22:11, 11 April 2022 (UTC)
 * ✅ — xaosflux  Talk 22:07, 17 April 2022 (UTC)

Non-slow mode
Does someone have suggestions on how to disable the slow mode in the "Citations" button under the edit window, without forking the entire gadget? I'm never interested in adding bibcodes and the slowness is excruciating. Nemo 08:45, 18 July 2019 (UTC)


 * Three possibilities come to mind. Some way to set a user preference (I think you want this).  Your own copy of the script instead (some people do this).  Two buttons instead of one.  AManWithNoPlan (talk) 13:31, 18 July 2019 (UTC)
 * Maybe a JavaScript variable that I can override in my JavaScript file (if I'm lucky with the load order)? I don't want to clutter anyone else's interface! Nemo 15:21, 18 July 2019 (UTC)
 * if you can get load order right, then that is genius. AManWithNoPlan (talk) 16:14, 18 July 2019 (UTC)
 * For now I'm just relying on user scripts (both on-wiki JS and Tampermonkey), so no need to bother changing anything just for me. (I can share them if needed, nothing special.) Nemo 13:53, 19 July 2019 (UTC)

Category mode
While we're at it, it might be worth looking at some of the tweaks made in User:Headbomb/citations.js, to have one-click category thing. Or we might not want that featured available by default. &#32; Headbomb {t · c · p · b} 19:17, 18 July 2019 (UTC)

Slow and times out with "Citation request failed" error message
When edit a page and I use the "Citations" button which is after the "Edit summary" line, I get a delay of about 5 minutes, and then the bot always gives an error "Citation request failed".

When I use the https://citations.toolforge.org/ - therea are errors in the log file that the operation timed out in 5 minutes. To be precise, the message is: "!Operation timed out after 5001 milliseconds with 0 bytes received". See the log below.

For example, try one of the following pages: CoronaVac, Alec Baldwin, Iron Man (2008 film), or any other pages of a size similar to the size of the above pages.

Here is the log from //citations.toolforge.org/ :


 * The gadget is by definition less reliable, since it requires a stable link between the web browser and the server. "Operation timed out after 5001 milliseconds with 0 bytes received" is not an error message, but simply information.  Also, that is five seconds, not five minutes. AManWithNoPlan (talk) 15:42, 8 November 2021 (UTC)
 * Gadget stability greatly increased, but timeouts on huge sections are not really fixable without a total redesign on both ends. AManWithNoPlan (talk) 11:42, 11 June 2022 (UTC)

Bug report 2013
This script puts bogus values inside event handler attributes of edit form buttons, raising an exception whenever either of them is clicked. This can be very annoying when developing other scripts. To fix this, addCitationBot function should be rewritten, for example as: Keφr 14:12, 23 February 2013 (UTC)
 * Sorry for the delay in responding, but could you double-check your code and confirm it will work correctly? Perhaps you could ask someone familiar with javascript to check the code for you? (Because I am not.) Regards &mdash; Martin (MSGJ · talk) 20:42, 3 March 2013 (UTC)
 * Tested it, it had a minor flaw in that the browser asked for confirmation when clicking the button after modifying the form. Fixed now. Keφr 15:35, 4 March 2013 (UTC)
 * I am worried that addEventListener is not supported in earlier versions of IE. Ruslik_ Zero 17:09, 20 March 2013 (UTC)
 * I've marked this request as answered until Ruslik0's concerns have been addressed. Also, it looks like none of the regular patrollers at CAT:EP are able to answer JavaScript requests judging from the lack of response. I think you will get a much better response by directly asking an admin who knows js. Maybe Ruslik0 is willing to make the edit once everything has been worked out? Or off the top of my head, Anomie may be able to help you if they are around. — Mr. Stradivarius  ♪ talk ♪ 08:16, 25 March 2013 (UTC)
 * Please resolve this. 61333 was created by someone who thought this was related to VisualEditor. -- Krenair (talk &bull; contribs) 00:01, 14 February 2014 (UTC)

Gadget not working at all
It isn't working. At all. When I click on the Citations button, an alert pops up saying "Error: Citations request failed". I went into my browser's developer mode and there were two errors:

When I clicked on that citation/gadgetapi.php page, there was an error:

 This page isn’t working right now citations.toolforge.org can't currently handle this request. HTTP ERROR 500

"HTTP ERROR 500" is Internal Server Error, the generic server-side error message. What is going on?&thinsp;&mdash; Mr. Guye (talk) (contribs)&thinsp; 19:54, 16 June 2020 (UTC)


 * and thus the need for the edit request. AManWithNoPlan (talk) 19:57, 16 June 2020 (UTC)
 * . Any more discussions should go to bot's page, as the gadget script is working perfectly.  AManWithNoPlan (talk) 00:59, 17 June 2020 (UTC)