Wikipedia talk:RefToolbar/Archive 1

Reorganize associated pages
I intend to move Wikipedia talk:RefToolbar 1.0 and Wikipedia talk:refToolbar 2.0 to subpages of Wikipedia talk:RefToolbar as Wikipedia talk:RefToolbar/1.0 and Wikipedia talk:RefToolbar/2.0, respectively. This will better organize the information related to RefToolbar in anticipation of future versions (for instance as a result of New editor engagement/Smaller issues). It will also fix the disparity in capitalization. This page was previously a redirect to Wikipedia talk:RefToolbar 1.0, which was confusing. I have removed the redirect and added hatnotes so that future discussion on the version pages is limited to topics about that version. General discussion should occur here. It looks like few articles link to these pages so the moves I am proposing should be uncontroversial maintenance. If you can think of a good reason why it should not be done, please explain here. Cheers, Jason Quinn (talk) 22:36, 27 September 2012 (UTC)


 * There has been ample time for discussion on this. Any last minute remarks before I go ahead and make changes? I intend to organizes some of the pages into subpages of this page, and also to redirect talk pages here so that there's a more unified place of discussion. I'm really quite disappointed that such a widely-used and important feature basically has no maintainers. Jason Quinn (talk) 20:13, 16 November 2012 (UTC)

I have completed the moves. It all went surprisingly smoothly. This page is now the centralized discussion on Wikipedia for the Reftoolbar implementation here. The talk pages for the 1.0 and 2.0 pages (now subpages) redirect here. I have also added an archive box to access the the old discussion. There's still the Mediawiki page and its talk page, so the discussion is still fragmented but at least now the discussion on Wikipedia will be more coherent. Perhaps more consolidation can occur in the future. Jason Quinn (talk) 04:33, 21 November 2012 (UTC)

Cite video → Cite AV media
Cite video has been renamed to Cite AV media to more accurately reflect its purpose. Cite video is a redirect and still works as expected. --— Gadget850 (Ed) talk 08:53, 1 January 2013 (UTC)

lookup.php and crossref.php source code now available
After contacting User:Mr.Z-man, he has made the toolserver-based php sources (lookup.php and crossref.php) available so that others can take over maintenance of the Reftoolbar. I have started to investigate how it works. I have already noticed a potential problem with the xISBN Web service which is used to provide the ISBN lookup. That service is limited to 1000 requests per day. I have no idea how many requests Wikipedia generates. I would guesstimate it's around that. We may need to contact the Worldcat technical support at some point to make sure we are kosher. I am planning on trying to get a toolsever account and transfer the scripts over from Mr.Z-man's. It would also probably help for me to become an admin here so I can edit scripts without waiting or bothering others although I'm not really looking forward to that process. Regardless, we now have all the pieces to keep the Reftoolbar working. That's a huge improvement. Jason Quinn (talk) 00:34, 24 January 2013 (UTC)
 * That's great news! I'm particularly fond of the ISBN lookup in the Reftoolbar, so this 1000 requests/day limit is rather shocking ;-) There are stats on german WP counting total refs in April 2011 and April 2012: in 1 year there was a growth of 1 million refs (2,6 to 3,6 million), so ~2.500 refs/day are added. If 10% of refs are books, that could be a lot of ISBN lookups! --Atlasowa (talk) 23:31, 24 January 2013 (UTC)

Book ISBN bug
There's a tiny bug for First and last names: Screenshot This only happens for some books. (Maybe because of long list of authors). -Saurabh P. (talk) 10:08, 16 December 2012 (UTC)
 * Looks like it is in whatever database that is being queried: http://toolserver.org/~alexz/ref/lookup.php?isbn=1588904571 --— Gadget850 (Ed) talk 14:56, 16 December 2012 (UTC)
 * I see. Has it always been like this? I started using autofill just a while ago. The database staff should be let known of this extraction error. -Saurabh P. (talk) 09:16, 17 December 2012 (UTC)
 * Now that we have access to lookup.php I can see that it is calling WorldCat and then massaging the returned data. The returned data includes  Lookup.php processes this to split the author into first and last names by looking for the last space in the string, thus filling in   and
 * Lest you misconstrue, I am not a PHP programmer, but I have a lot of experience picking apart bits of code that I know nothing about. --— Gadget850 (Ed) talk 12:00, 25 January 2013 (UTC)
 * After reflection, I don't see any good solution. Lookup.php works just fine for a Western name with a singular surname, but will do the split badly for multiple names or for compound surnames such as Mark L. Van Name. --— Gadget850 (Ed) talk 13:22, 25 January 2013 (UTC)
 * I think, we can put a different processing code for returned data if it includes "[et. al.]", "edited by" etc. If you or someone reading this has access to the PHP and editing rights, s/he can write the code for it, one can keep it in beta and errors will get reported. God knows how many badly cut references have been already placed in mainspace pages. Alternatively, we can make it put whole returned data in first name field, which is a bad idea. —Saurabh P. (talk) 01:56, 27 January 2013 (UTC)

Roadmap to 3.0
The Reftoolbar currently has no active maintainers. This is a shame because it's part of the default interface and is one of the best tools for editors. I have used the toolbar for quite some time and have some good ideas for how it could be made even better which I have mentioned already at MediaWiki talk:RefToolbar.js. As preparation, I have organized a lot of the information related to the Reftoolbar to make it easier for people to understand how it works and where the relevant sources are. I am now proposing a roadmap to bring the toolbar up-to-date. It's a three-stage proposal.

Stage zero (gather support)
Find people interested in this project, perhaps even get the WMF involved.

Stage one (get current house in order)
Identify and fix existing issues with the current implementation.


 * Under help > discussion, the "What you get" entries for " ~ " and " " have parse errors. This isn't a RefToolbar problem but a known WikiEditor issue. It is Bug 42107.
 * The 1.0 no longer seem to work (at least under Vector) if the user doesn't want to use Reftoolbar 2.0.
 * Any more??

Stage two (version 2.6 a/b)
Make "simple" improvements to modernize the template.


 * Edit scripts to add a space after each parameter/value in the template rather than just creating a single long string without whitespace breaks. This is particularly important for smaller screens to get sensible line-breaking. I endorse the "space after" solution so that the generated code would look like this " ".
 * Revamp the form interface:
 * Remove deprecated parameters like "coauthors".
 * Carefully organize the forms in a way that makes sense.
 * Use more tooltips to explain the intention of the parameters.
 * Add useful fields not currently there like "quote".
 * What else?

Stage three (leading to version 3.0a/b)
Make more complex improvements that greatly increase utility.


 * Have a dynamic form that has an "Add author" button.
 * A single "Page/pages" field that autodetects if "page=" or "pages=" should be used.
 * What else??

To make this happen we need volunteers, especially those who can actually edit the templates. Unfortunately, my javascript is weak, as is my currently understanding of how the Reftoolbar works at the code level. I'll be learning as I go. I have however, devised a solid plan and given editors a better way of contributing. Jason Quinn (talk) 21:30, 11 December 2012 (UTC)


 * I'm not going to be of much technical assistance here, but I am perhaps a big, big user of the refToolbar tools, particularly when a group of us were working to cut back the URBLP backlog. The most critical functionality in terms of general use are the auto-fillin helpers, that is, the tools that take an ISBN, a Google Books URL, a New York Times web site URL (or even just a plain old URL to get a title), a DOI, an ISSN) and take a stab at filling in some of the fields for you.  Different versions of refToolBar have selected different subsets of these features to include.  The correct answer is "all of them", sometimes I want to start with an ISBN (they're everywhere), but many Google Books URLs include page number references, and those are properly handled by at least one version of refToolbar.
 * I wonder if it would be possible to provide automation to check for existing Wayback/WebCite snapshots, and/or request the latter. The reference expiration problem is serious.
 * I don't find the layouts of any of them to currently be problematic.
 * Missing quote= is sad, but at least one form in one of the versions has a "stick in your extra fields here" option and that works pretty well. --j⚛e deckertalk 20:36, 13 December 2012 (UTC)


 * Hi, j⚛e decker. Glad to hear from another user of autofill. One of the current problems with RefToolbar is that the script that autofills the forms is in an inactive user's toolserver account and is unreadable. That script will have to be replaced if it cannot be obtained to upgrade. I'm slowly thinking about solving such issues but I have travels coming up and will not be very active for a few weeks at least. In terms of the current forms, I'm convinced that my versions would change your mind. At some point, I will produce mock-ups that are more concrete. Jason Quinn (talk) 23:46, 14 December 2012 (UTC)
 * This is great! It's such a useful feature, especially the ISBN autofill! I would love to use it on german WP too. I'll watch this page and i hope i can help in some way :-) --Atlasowa (talk) 09:56, 20 December 2012 (UTC)


 * Jason, Sorry I've missed this until now. Congrats on your RFA, I was glad to be able to support.  I don't have TS access so I can't help directly there, but bet we could find someone helpful in that community.  I look forward to your mockups!  --j⚛e deckertalk 00:29, 7 February 2013 (UTC)

Please change embedded explanation of "Work" in cite web template to match its description in documentation
If you use the dropdown to insert a "cite web" template, the vaguely titled "Work" field provides a "?" over which you can hover, which then says "What larger work this is part of?". Every time I see that, I ask myself "What do they mean?". Then, buried in documentation, I see that it means "Title of website". Which explanation is short, sweet, and readily understandable. Can we please make the hint match the documentation? --Hobbes Goodyear (talk) 13:12, 2 February 2013 (UTC)
 * The tooltip is located in MediaWiki:RefToolbarMessages-en.js:

'cite-work-tooltip' : 'What larger work this is part of',
 * The work parameter is used in cite journal and others to record the journal, magazine, newspaper or periodical; in cite web it is the website. I suggest:

'cite-work-tooltip' : 'journal, magazine, newspaper, periodical or website'
 * --— Gadget850 (Ed) talk 13:55, 2 February 2013 (UTC)
 * Agree with Gadget850's suggestion. --Hobbes Goodyear (talk) 18:35, 2 February 2013 (UTC)
 * While we are in this, are other tweaks needed? --— Gadget850 (Ed) talk 02:16, 3 February 2013 (UTC)


 * The few other existing hints seem clear. Perhaps we could add a new one for the pages parameter? Esp. when citing books, I think that editors could easily jump to the wrong conclusion about what it means. Something like this?

'cite-pages-tooltip' : 'Not for total number of pages in source. Separate cited page ranges with an en dash (–) and non-sequential pages with a comma'
 * --Hobbes Goodyear (talk) 12:35, 6 February 2013 (UTC)
 * I would rather be consistent and use the description from Citation Style documentation: "Pages in the source that supports the content; separate page ranges with an en dash (–); separate non-sequential pages with a comma ; do not use to indicate the total number of pages in the source." This would show as ? --— Gadget850 (Ed) talk 13:13, 6 February 2013 (UTC)
 * I thought that might be too long, but if not, it's good. --Hobbes Goodyear (talk) 02:00, 7 February 2013 (UTC)
 * What version of RefToolbar do you use? --— Gadget850 (Ed) talk 14:09, 6 February 2013 (UTC)
 * Don't know the version--I assume whatever the default is for Windows 8 (bleh) and up-to-date versions of Chrome and JS. --Hobbes Goodyear (talk) 02:00, 7 February 2013 (UTC)
 * See RefToolbar for the three versions. --— Gadget850 (Ed) talk 02:22, 7 February 2013 (UTC)
 * 2.0b, in Chrome, which I've switched to using, since IE10 under Windows 8 is unstable and dies on me. And IE10 shows me no RefToolar at all, another annoyance. --Hobbes Goodyear (talk) 03:05, 7 February 2013 (UTC)
 * The only tooltips I see are Cite web: work, author's article; Cite news: author's article; Cite book: author's article; Cite journal: at, ref, postscript. Found where the tooltips are inserted: MediaWiki:RefToolbarConfig.js. There are a lot of tooltips defined, but only those few are used. --— Gadget850 (Ed) talk 10:54, 7 February 2013 (UTC)


 * Hey, Gadget850, either we are talking to ourselves here, or others are agreeing in silence. Either way, I'd like to make your version of the edit and addition discussed here--I'd prefer if you would do the honors, but I'll have a go if I don't hear back. --Hobbes Goodyear (talk) 01:58, 15 February 2013 (UTC)
 * Oh. I already did it, broke the whole RefToolbar and got it fixed. --— Gadget850 (Ed) talk 02:02, 15 February 2013 (UTC)
 * Well, what do you know, the "Work" hint looks smashing now. How about adding the bit about "pages"? --Hobbes Goodyear (talk) 04:31, 15 February 2013 (UTC)
 * Since I broke this once and got a lot of comments at VPT and HD, I am going to do this at http://test.wikipedia.org. Which is good, since I got a bit backwards.  has a tooltip defined, but the tooltip isn't actually used. OK— check http://test.wikipedia.org and see how it looks. --—  Gadget850 (Ed) talk 11:41, 15 February 2013 (UTC)
 * I checked it out there and it works fine. However, having tried it out, I am concerned that reproducing that entire block of text from the documentation is too wordy for a hint--I can't get through it all before it automatically disappears, and I already know what it says. --Hobbes Goodyear (talk) 03:37, 16 February 2013 (UTC)
 * For me, the tooltip shows as long as the mouse hovers over the ? . --— Gadget850 (Ed) talk 12:16, 16 February 2013 (UTC)
 * Disappears after about 10 seconds for me--using Chrome/Windows 8. --Hobbes Goodyear (talk) 18:49, 17 February 2013 (UTC)
 * Looks like a well-known feature of Chrome; see https://chrome.google.com/webstore/detail/comic-text/hfpglafkfedcnnojpioconphfcelcljj. --— Gadget850 (Ed) talk 00:06, 18 February 2013 (UTC)
 * Okay, then. In any event, it works, and either the long or short version are better than no guidance at all. Bung it on in! --Hobbes Goodyear (talk) 01:52, 18 February 2013 (UTC)
 * Done. --— Gadget850 (Ed) talk 02:18, 18 February 2013 (UTC)

Gadget not working on gl.wikipedia
I have ported this gadget to the Galician Wikipedia but it does not work. I tried following the instructions and did not work. Then I tried lots of other things with the same result. Can you check what's wrong? Here are the affected pages: MediaWiki:RefToolbar.js, MediaWiki:RefToolbarConfig.js, MediaWiki:RefToolbarMessages-en.js, MediaWiki:RefToolbarMessages-gl.js and MediaWiki:Gadget-refToolbar.js (and MediaWiki:Gadget-refToolbar and MediaWiki:Gadgets-definition). I would appreciate your help. Cheers! --Toliño (talk) 13:50, 14 February 2013 (UTC)
 * I noticed [//gl.wikipedia.org/w/index.php?title=MediaWiki:Gadget-refToolbar.js&oldid=2814533 gl:MediaWiki:Gadget-refToolbar.js] uses "mw.user.options" but this is from module "user.options", which is not yet declared as a dependency on gl:MediaWiki:Gadgets-definition. Besides, the code is different from current version of [//en.wikipedia.org/w/index.php?title=Wikipedia:RefToolbar/2.0/porting&oldid=536906679 Wikipedia:RefToolbar/2.0/porting]. Helder 16:10, 14 February 2013 (UTC)
 * Thank you for your corrections. I have made this edits: [//gl.wikipedia.org/w/index.php?title=MediaWiki:Gadget-refToolbar.js&diff=prev&oldid=2815261] and [//gl.wikipedia.org/w/index.php?title=MediaWiki:Gadgets-definition&diff=prev&oldid=2815263]. However, they seem not to be enough. Any other suggestion? --Toliño (talk) 19:36, 14 February 2013 (UTC)
 * Yes. Helder 17:59, 15 February 2013 (UTC)
 * Oh, thank you so much! I think there is one thing left: We need support for Galician to be added at MediaWiki:RefToolbar.js. Otherwise, messages are shown in English (which is default). Is that right? --Toliño (talk) 13:25, 16 February 2013 (UTC)
 * You will need to make a copy of MediaWiki:RefToolbarMessages-en.js, then save it as MediaWiki:RefToolbarMessages-gl.js then translate the parts after the colon. Then we can add it to MediaWiki:RefToolbar.js. --—  Gadget850 (Ed) talk 17:12, 16 February 2013 (UTC)
 * Not really. The script does not support other languages as it should. Currently, other wikis have to copy their translation over the local "MediaWiki:RefToolbarMessages-en.js". See MediaWiki_talk:RefToolbar.js for details. Helder 13:12, 17 February 2013 (UTC)
 * Now it works! Thank you so much! I am so grateful for your help. This tool is very useful. Thanks! --Toliño (talk) 13:29, 17 February 2013 (UTC)
 * Ah. We should document what happened here so we don't reinvent the wheel on the next export to another language. --— Gadget850 (Ed) talk 14:30, 17 February 2013 (UTC)
 * Is [//en.wikipedia.org/w/index.php?title=Wikipedia:RefToolbar/2.0&diff=539248385 this change] enough? Helder 16:19, 20 February 2013 (UTC)

Lua updates
The following templates have been update to use the Lua module:
 * cite book
 * cite encyclopedia
 * cite journal
 * cite news
 * cite web

These updated templates are backward compatible with the old version, but there are some new features:
 * There is no limit to the number of authors: first1, last1...firstn,lastn
 * The same for editors
 * Coauthors still works, but should be deprecated

See Module talk:Citation/CS1/Updates for a discussion. --  Gadget850 (Ed) talk 12:15, 4 April 2013 (UTC)

Porting instructions
I've been pulling my hair out trying to get the scripts to import onto a MW 1.20.4 installation (other instructions floating around the web don't work either). Could someone confirm if they still work, and if other dependencies are needed (I have Wikieditor installed, but that doesn't seem to help either). Vickytnz (talk) 15:34, 6 May 2013 (UTC)

Another proposed code move for maintainability purposes
I now intend to move the following large code block from MediaWiki:RefToolbarConfig.js to MediaWiki:RefToolbar.js. The block defines functions and aren't really related to configuration anyhow and so don't belong in MediaWiki:RefToolbarConfig.js. The remaining code in that file is stuff that is intended to be modified so this move isolates volatile code from the rest. Plus the Reftoolbar will then bundle most of its important stuff in only two places (MediaWiki:RefToolbar.js and MediaWiki:RefToolbarBase.js). This will make the code much easier to understand. The code will moved right after the line that imports MediaWiki:RefToolbarConfig.js in MediaWiki:RefToolbar.js. If you see any problems with this move, let me know. I'm learning Javascript as I go here and my workflow still sucks as far testing this changes. I'm more or less doing it live. Jason Quinn (talk) 03:33, 12 May 2013 (UTC)

Have RefToolbar.js call RefToolbarConfig.js instead of RefToolbarMessages-LA.js
If you look at the tail of MediaWiki:RefToolbarMessages-en.js and MediaWiki:RefToolbarMessages-de.js you'll see they both have these two lines

as their last lines. Since all "message" scripts call these same two lines as the very last thing they do, it seems to make sense to move these two lines to MediaWiki:RefToolbar.js after the calls to the "message" script themselves (see the call graph). This is the first of a few code refractoring moves I intend. This is is the simplest. Any objections to this move? Jason Quinn (talk) 03:49, 11 May 2013 (UTC)


 * I've made this change. Let me know if there are any problems. Jason Quinn (talk) 03:20, 12 May 2013 (UTC)

There's been one report of an issue. Not clear if it's cache-related or not. Anybody else? Jason Quinn (talk) 21:28, 12 May 2013 (UTC)

Dates in cite templates
See my comments at Help talk:Citation Style 1. It seems that I've been using the "Templates" toolbar to insert references and dutifully inputting the date as separate elements in the date, month and year fields without realising that the resulting cite web template ignores the month and year fields when the date is entered. I suppose it was a fairly minor detail that didn't stand out so I didn't notice until now. The result has been any number of citations I've made that now only display the day of the month instead of the day, month and year!

Perhaps the "Template" dialog box could have a tooltip or other functionality to draw attention that, when the full date is known, the full date should go in the date field and the month and year fields should be left blank? I'm pretty tech savvy but completely glossed over that one! —sroc (talk) 02:45, 6 May 2013 (UTC)


 * That's an excellent idea. The Reftoolbar has many usability issues. I know how to add tooltips and this sounds like something that should be done. I'm traveling at the moment so the first chance to do it won't be for a bit. Jason Quinn (talk) 04:20, 6 May 2013 (UTC)


 * Awesome, thanks! I wonder if there's a bot that could look for instances that need correction.  I don't know where to start with all the tech stuff!  —sroc (talk) 08:41, 6 May 2013 (UTC)
 * See Module talk:Citation/CS1/Archive 8. --  Gadget850talk 11:15, 6 May 2013 (UTC)


 * Thanks, Gadget850, for pointing out the interesting discussion. I'll leave it up to you if you think it's worth flagging there the suggestion of a bot to handle the clean-up of cite templates using   (and judging from the clean-up I've done of articles I've edited, I don't think I'm the only one to have done this).  —sroc (talk) 15:05, 6 May 2013 (UTC)


 * As discussed at Module talk:Citation/CS1, I propose that the RefToolbar wizard be updated as follows:
 * Remove the month field, as this parameter is to be deprecated;
 * Rename the year field to year (when full date unknown) or year (Harvard referencing only) or something similar to indicate that it should only be used in particular cases and otherwise ignored when a full date is known (in which case the full date should be entered in the date field).
 * I think this would overcome the above issues. We would need a bot to clean up all of the existing faulty  tags, though.  —sroc (talk) 02:12, 22 May 2013 (UTC)
 * I don't think that 'month' is going to be deprecated, as it is often used for a season for periodicals and 'date' will not support a season.
 * Perhaps we should show as 'full date' OR 'month' 'year'. --  Gadget850talk 10:29, 22 May 2013 (UTC)
 * Ah, I see.
 * I'm not sure that using the labels "full date", "month", "year" completely avoids the confusion, depending on how the "month" and "year" fields are set off from the "full date" field. Maybe something like: "full date", "month/season (Harvard referencing only)", "year reference (Harvard referencing only)"?  Maybe including tooltips explaining the use of each, maybe with an illustrative example? —sroc (talk) 13:22, 22 May 2013 (UTC)
 * Although admittedly the "full date" label should prompt the completion of the full date where it is needed and if the user also completes the "month" and "year" fields by mistake they would be redundant in most cases. Harmless, but time wasting for the poor editor that completes them every time for no reason.  —sroc (talk) 13:25, 22 May 2013 (UTC)

Deleting text
The current ref tool is deleting text again. When one clicks insert it deletes the line of text that comes next. What can be done to fix this? Doc James (talk · contribs · email) (if I write on your page reply on mine) 23:45, 1 June 2013 (UTC)


 * What do you mean it's deleting text again? Barring one small change a few weeks ago which was quickly reverted, there haven't been any changes to the code that should be causing new behavior in a long time. It should be working the same way it has been. Try refreshing you cache to make sure it isn't some browser issue. If you give me more detail, I can't can try to reproduce. Jason Quinn (talk) 03:15, 4 June 2013 (UTC)
 * Okay will post here when it acts up again. Doc James  (talk · contribs · email) (if I write on your page reply on mine) 03:29, 4 June 2013 (UTC)

Help for the absent-minded?
I've just done it again: created a lovely ref, used "Preview citation", forgotten to use "Add citation", moved on elsewhere ... had to re-create the ref after noticing that the paragraph was still unsourced.

Various points within Wikipedia gently prevent me from doing silly things like that ("Do you want to leave this page?" while editing; reminder that I haven't given an edit summary, etc). It would be great if the RefToolbar function could do so too: a nudge when leaving a page with a reference creation box still open?

From the table in the documentation page, I seem to be using RefToolbar version 1.0. There was some reason I chose to switch off "Enable enhanced toolbar", can't now remember what it was. Perhaps this has been fixed in a newer version? If so I might reconsider that decision and move to access the new-and-improved RefToolbar. Over the months I've made this mistake umpteen times, and it's usually on the most complicated references. Pam D  14:08, 17 June 2013 (UTC)


 * PS I think RefToolbar is brilliant: makes it so easy to add references. Well done. Pam  D  14:10, 17 June 2013 (UTC)

Autofill 1
This feature has not been working for some weeks now. Any method of fixing it? Doc James (talk · contribs · email) (if I write on your page reply on mine) 17:19, 9 September 2013 (UTC)


 * It still works (try ISBN 1-57806-640-9) for example but I believe I have noticed it's been very slow at times and seemingly missing more books than it once did. (Make sure it's not a Javascript problem if you're using NoScript or something similar.) Jason Quinn (talk) 18:40, 9 September 2013 (UTC)
 * You are right it works with firefox, just not google chrome. Maybe I need to switch back to firefox. Doc James  (talk · contribs · email) (if I write on your page reply on mine) 21:29, 9 September 2013 (UTC)


 * Hmmm... that's interesting. Didn't occur to me about that. Jason Quinn (talk) 22:58, 9 September 2013 (UTC)
 * Confirmed! It works in FF 23 and IE 8, but not Chrome. I guess I'll be editing Wikipedia in Firefox now. --Slashme (talk) 06:38, 10 September 2013 (UTC)


 * For what it's worth, I'm not aware of any changes that have happened in the Reftoolbar scripts themselves that would have caused an issue a few weeks ago. The Reftoolbar is basically in the same form it has been for a long time. Jason Quinn (talk) 16:45, 12 September 2013 (UTC)
 * Working on Chrome again today :-) Doc James  (talk · contribs · email) (if I write on your page reply on mine) 16:49, 12 September 2013 (UTC)

For me it is not working on either Firefox or Chrome.-- Brainy J  ~ ✿ ~ ( talk ) 13:25, 11 October 2013 (UTC)

3 tweaks proposed: agency field, 2nd author's name, & works other than newspapers
There are three parameters that are used extremely commonly for articles that cite news reports but that are hidden from the main window until you click "show extra fields". It would be very helpful if these three fields could be moved to the main window.


 * Agency field - Many news reports are based on the work of news agencies or wire services such as Reuters, the Associated Press, and AFP. My sense is that works developed by the Associated Press are now cited more frequently than those of any other entity. Yet the main window has no field to capture this information. Many editors who routinely use RefToolbar probably aren't even aware that Agency should be cited in these cases (I wasn't until after I'd been editing for many months).


 * Second Author's First & Last names - Most news articles have only a single bylined author, but a great many additional articles have a second author. The number that have two authors is probably many times greater than the number with 3 or more authors. Can fields for the second author's first and second author's last names be added to the main window (ie, unhidden)? If not, can at least the names be split into 2nd author's first and last instead of just one field for both first and last?


 * Work field, as an alternative to "Newspaper" - Increasingly, many of the news items editors are citing come from sources other than newspapers, yet the Reftoolbar cite news template form does not reflect this fact. Could maybe the Work field, or another appropriate alternative, be placed on the main window? "Newspaper" just doesn't work if you are citing NPR's Morning Edition, CNN's The Situation Room, or BBC's Newsnight. Dezastru (talk) 15:44, 14 October 2013 (UTC)

Why this cannot be an extension?
I imported this to ml.wikipedia and it is great. Malayalam translations of interface messages can be available at ml:മീഡിയവിക്കി:RefToolbarMessages-ml.js (although I need to translate month names seperately at ml:മീഡിയവിക്കി:RefToolbarConfig.js). If this become an extension I believe every wiki may able to use advantage of this.--Praveen: talk 08:51, 19 March 2014 (UTC)

Citation disappears if one forgets to re-select main edit field
Hello,

I have recently ran into issues with RefToolbar. When I click on "" it opens the menus as usual and I can fill in the fields. But when I then click "Add citation", it does not add the citation code to the main edit field. The only way I can make it to add the code is if I, after filling in the toolbar text fields, remember to re-select the caret position where I want to add the citation code in the main edit field just before clicking "Add citation". This problem first appeared on March 11, 2014 – before that, it was not required to re-select the main edit field after filling in the citation fields and before clicking the "Add citation" button. This is particularly frustrating, as if the citation is not written anywhere after filling in the fields, one must start over and remember to re-select the main edit field before clicking "Add citation" this time.

I can successfully reproduce this error on Firefox and Chrome and in Monobook and Vector skins alike. --hydrox (talk) 15:09, 2 April 2014 (UTC)
 * Please see Village pump (technical)/Archive 124. -- Red rose64 (talk) 17:03, 2 April 2014 (UTC)


 * Well, apparently I am not the only one with this issue. But there is still no solution. What User:Helder.wiki proposed there (turning off "Ehanced toolbar" in preferences) does not help. --hydrox (talk) 20:16, 2 April 2014 (UTC)


 * I've suffered from it as well: very frustrating when you craft a good detailed reference, click to add it, and lose it. I haven't yet tried the suggestion of clicking at the insertion point, but even having to do that would be a backward step from the previous behaviour. Why are we being given a less helpful version of the software? 21:31, 2 April 2014 (UTC) — Preceding unsigned comment added by PamD (talk • contribs)


 * I found the problem in the code. The functionality was broken when this commit updated MediaWiki core JavaScript support library so that the currentFocused variable gets updated whenever the user selects a new text field, including dynamically created ones. So the tags get inserted, but they go into the currently focused text field, which is usually one of the dynamically created text fields of the RefToolbar gadget when the user is filling in the citation fields. The RefToolbar text fields are then deleted right after the insertion, so the finished citation wikicode is lost unless one remembered to refocus the main edit field (#wpTextbox1) before hitting "Add citation". I've opened an edit request at MediaWiki talk:RefToolbarNoDialogs.js with a fix. --hydrox (talk) 14:40, 3 April 2014 (UTC)


 * This should be fixed now for all users. --hydrox (talk) 19:19, 3 April 2014 (UTC)
 * Thanks! Haven't tried it yet, but this sounds like really good news. Pam  D  21:50, 3 April 2014 (UTC)

VE support
See Village pump (technical)/Archive 125 regarding a variant of RefToolbar that supports VisualEditor. Eran (talk) 17:49, 4 April 2014 (UTC)


 * Please see mw:VisualEditor/Design/Reference Dialog. --Atlasowa (talk) 21:49, 6 April 2014 (UTC)

Toolbar Cite book missing |year=
See This thread. The short of it is that in the cite book template from the drop down menu on this toolbar, |year= is missing and has been replaced with |date=. Can we please put |year= back to we can reference books correctly? — Maile (talk) 23:22, 8 April 2014 (UTC)


 * This editor believes that there is no need for year in any of the commonly used templates – which includes all of the CS1 templates available from the RefToolbar dropdown.  Those templates are processed and rendered by Module:Citation/CS1.


 * When date is not present but year is, year is treated as an alias of date. When both date and year are present, which was sometimes necessary because of past limitations in the older, then the module handles them separately for backward compatibility.  In those cases, the value in year is used as part of the   anchor.  When only one of either date or year is present, then CS1 extracts the year portion of the supplied value for use in the   anchor.


 * When the format of the supplied date in date is invalid, incorrect spelling, punctuation, ambiguous format, etc, CS1 does not supply a year value to the  anchor.


 * I have seen no evidence to show that date in fails to work with  or any of the  family when year in  does work.


 * —Trappist the monk (talk) 00:29, 9 April 2014 (UTC)

Maintainers
A December 2012 section currently near the top of this page says "The Reftoolbar currently has no active maintainers". Is that still the case? There seem to be a number of unresolved issues on this page. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 14:11, 13 May 2014 (UTC)

User-specific date format
So I'm trying to edit the accessdate to be autofilled to "MMM DD, YYYY" instead of "DD MMM YYYY". I added this code to my User:X96lee15/vector.js page: $('head').one('reftoolbarbase', function {   CiteTB.UserOptions['date format'] = ",  ";    CiteTB.UserOptions['autodate fields'] = ['accessdate']; });

Is that the right code to add to the right location? Thanks! — X96lee15 (talk) 18:39, 2 July 2013 (UTC)
 * I know this is ancient, but I copied your code into my /vector.js page and made the following change to get it to work:
 * CiteTB.UserOptions['date format'] = " , ";
 * (I moved the comma after rather than ).
 * Seems to be working fine, and I really appreciate it! Thanks!&mdash;D'Ranged 1 talk 02:10, 7 May 2014 (UTC)
 * Still not working for me. Is there something else I should by trying? (I've refreshed my cache). — X96lee15 (talk) 18:15, 13 May 2014 (UTC)
 * I've added the following to my .js page under your script above; this gives me additional tools in the left toolbar to change all dates in an article I'm editing to be the same format. I don't know if it makes a difference in the RefToolbar date format, but both are working for me. Try adding the script below and see if that helps; the documentation for the script is at User:Ohconfucius/script/MOSNUM dates.
 * If you like, just go to User:D'Ranged 1/vector.js and copy the entire script from there. Good luck!&mdash; D'Ranged 1  talk  19:28, 13 May 2014 (UTC)
 * If you like, just go to User:D'Ranged 1/vector.js and copy the entire script from there. Good luck!&mdash; D'Ranged 1  talk  19:28, 13 May 2014 (UTC)

Cite has disappeared (well at least for me) Help?
I use the basic version of Wikipedia when editing, I don't use any add-ons or features. I'm old school. When I click edit, the tool bar at the top has the heading options "Advanced", "Special characters" and "Help"; until recently it had "Cite" too (with the sub-options web, book, journal, news ect) but that seems to have disappeared recently. I'm using the latest version of Firefox and I thought it might be something to with that such as compatibility, however it has disappeared on Google Chrome too and on my work's PC which uses Internet Explorer. I'm now having to manually write or copy + paste blank citations and it is rather annoying. It was much simpler before. Can someone please help? Or tell me of any easier less tedious ways to do references please? Regards IJA (talk) 17:20, 21 May 2014 (UTC)
 * Do you have all preferences below enabled?
 * Show edit toolbar (requires JavaScript)
 * Enable enhanced editing toolbar
 * refToolbar, adds a "cite" button to the editing toolbar for quick and easy addition of commonly used citation templates.
 * If yes, do you see any errors in the console of you browser? Helder.wiki 19:08, 21 May 2014 (UTC)


 * Thank you very much, I have no idea why my settings had changed but it is working fine now I've restored them. Regards IJA (talk) 21:44, 21 May 2014 (UTC)
 * Yes it appears and disappears from time to time. Doc James  (talk · contribs · email) (if I write on your page reply on mine) 22:37, 21 May 2014 (UTC)

Deprecated fields
Any timeline as to when the deprecated fields will no longer be used in the pop-up citation creator? Specifically, "Coauthors" still appears in "cite web", "cite book", and "cite journal". It is my understanding that we are now to use "author2", "author3", etc., or "last2", first2", "last3", "first3", etc. It would also be wonderful to have an option to always show the extra fields; or to remove the button that hides them. This might prompt more people to archive the urls they're citing to avoid problems down the line. I don't know beans about scripting, or I'd offer to help; I could probably get the right fields to show in the template, but wouldn't begin to know how to transfer "Coauthors" to the proper field, and would hate to break millions of citation templates on current articles! Thanks for all your work on this—it really does make referencing articles easier and faster.&mdash;D'Ranged 1 talk 02:36, 7 May 2014 (UTC)


 * Why clutter up articles with "first1, last1, first2, last2, ..." parameter bloat? To generate meta data that no one uses?  If a citation has many authors, it ridiculous to force an editor to add each author to a separate author fields in this gui.  It is much more practical to use a single author parameter. Boghog (talk) 19:46, 12 May 2014 (UTC)
 * Because we generate COinS metadata so we can more readily reuse our citations. --  Gadget850talk 20:46, 12 May 2014 (UTC)
 * This includes citations. Reusing citations that may have been vandalized or contain honest mistakes is a bad idea. It is better to reload them fresh from reliable external databases such as PubMed.  For this, the only metadata that is required an identifier such as a PMID, doi, etc. In addition, CS1 could be modified to parse the single author parameters to generate metadata. Boghog (talk) 17:58, 13 May 2014 (UTC)
 * This includes citations. Reusing citations that may have been vandalized or contain honest mistakes is a bad idea. It is better to reload them fresh from reliable external databases such as PubMed.  For this, the only metadata that is required an identifier such as a PMID, doi, etc. In addition, CS1 could be modified to parse the single author parameters to generate metadata. Boghog (talk) 17:58, 13 May 2014 (UTC)

My post seems to have been hijacked for an argument. The fact is, the coauthors parameter has been deprecated. When will it be removed from the tool? And when might we expect other improvements that have been requested? Thank you.&mdash; D'Ranged 1  VTalk  02:01, 25 May 2014 (UTC)
 * Removing coauthors is the easy part. The hard part is adding support for lastN/firstN in a sensible manner that works with the DOI/PMID/ISBN autofill tool. I've been working on it for a while. Maybe a couple more days. As for the "other improvements", I'd need to know what they are and how much support they actually have. I have limited time to work on this, so I can't afford to be spending hours implementing something that no one really cares that much about. Mr.Z-man 14:59, 25 May 2014 (UTC)
 * Thank you for your reply and for hiding the digression. I gather from a bunch of posts that you are the primary reason we have RefToolbar at all. Sending much appreciation winging your way! There have been a few suggestions in the comments above, I would add support for showing an additional last#/first# in the basic area of the window as well as including archiveurl, archivedate, and deadurl in the basic window to encourage editors to submit their websites to an archive to reduce link rot. At the very least, could deadurl and trans-title be added? It's frustrating to specify a foreign language and not have an easy way to provide the English title. I will offer my assistance; however, I am very new at java (but learning quickly); if there is anything I can do to help, please let me know. Thanks again!&mdash; D'Ranged 1  VTalk  18:31, 25 May 2014 (UTC)

If I were going to add firstN/lastN support to anything used in conjunction with DOI/PMID/ISBN, I would first carefully investigate how the information about the authors is being automatically retrieved using the DOI, PMID, or ISBN. Does the retrieval method distinguish real live people from institutional authors? Does it separate the name of real live people into two parts? Are the two parts called "last name" and "first name"? Or are they called "given name" and "surname"; there's a difference when it comes to East Asian names. Do the methods actually obey in practice whatever the documentation says about the nature of the names? Jc3s5h (talk) 18:59, 25 May 2014 (UTC)
 * The PMID database only gives last name and initials together. The ISBN database concatenates all the names into a comma-separated list. The DOI database is the only one that separates the names into part; it uses the terms given name/surname, but appears to use them interchangeable with first/last. In some cases it only gives initials. The data is provided by the individual journals, so can vary in the amount of detail provided (some provide a full publishing date, others only a month/year). I don't think I've seen an institutional author on a paper with a DOI or PMID, so I don't know how that will work. It will probably break with an ISBN because of their crappy format (which also does stupid things like listing editors as authors and randomly adding "by" before the author names sometimes). The tool isn't designed to be foolproof. Users still need to check the results. Currently it uses first1/last1 for the first author, then puts the rest into coauthors as a semicolon-separated list of last, first pairs, which is the default format of the templates, so appearance-wise, there won't be any change. Mr.Z-man 03:54, 26 May 2014 (UTC)

error: Unknown dependency: ext.gadget.refToolbarBase, Exception thrown by ext.gadget.refToolbar
I had been installed mediawiki 1.22.6.

I tried to follow the instructions for RefToolbar located at Citation option in your edit toolbar and RefToolbar/2.0 but I don't understand either. but it doesn't work..

I get the error message in the Firefox Error Console.

Exception thrown by ext.gadget.refToolbar

Error: Unknown dependency: ext.gadget.refToolbarBase

What's the problem? — Preceding unsigned comment added by Lee Ji-sung (talk • contribs)
 * Can you provide a link to a page where this error is happening? It seems you did not create the (hidden) base module as in MediaWiki:Gadgets-definition. Helder.wiki 13:17, 26 May 2014 (UTC)

Request: a warning if citation created, previewed and absentmindedly not added?
I asked about this 11 months ago and no-one replied, so trying again! It would be wonderful if RefToolBar could be enhanced so that if I Preview a citation but don't go on to Add it the system would warn me before this becomes irreversible (I guess that means clicking on "cite" again or saving the edit). Time and again I create a splendid reference, Preview it, and forget to hit "Add citation" so have to do the work all over again. There are lots of other situations where the software warns me before I do something silly, and it would be very helpful if it could do so here too. Any possibility? Any comments? Should I be making the request somewhere else? Pam D  22:26, 25 May 2014 (UTC)
 * What version of RefToolbar are you using? I can't recreate the problem; once I've loaded a template form to fill in, I can't leave it without clicking either or . As a start, I'd suggest going to your preferences page, click the Gadgets tab, and deselect RefToolbar and save the change. Purge your cache (usually you can just hold down the Shift key and click on the reload icon), then return to the Gadgets tab and select RefToolbar and save the change. Purge the cache again (you might want to wait a few seconds to give the server a chance to catch up), and you should be using the latest version of RefToolbar. Hope this helps!&mdash; D'Ranged 1   VTalk  06:02, 26 May 2014 (UTC)
 * Thanks for your suggestion: sadly it didn't help. My version of RefToolBar has buttons labelled "Add citation" and "Preview citation", rather than "Insert" and "Cancel" (and a tick box labelled "Vertical form"). Does that help identify it? The "Cite" button has a tendency to wander round within the bar of buttons - used to be always penultimate next to "ref", now is often in the middle, currently between "horizontal line" and "Redirect".   Pam  D  09:44, 26 May 2014 (UTC)
 * Apparently you're still using Version 1.0! To enable the latest version, you need to go to your Preferences (yes, again), visit the Editing tab and check both  and  . Then save the changes, purge your cache (yes, again), and you should be set! Hope this solves the problem; if so, mischief managed!&mdash; D'Ranged 1   VTalk  14:42, 26 May 2014 (UTC)
 * Done. It certainly looks very different now. It does indeed need a "Insert" or a "Cancel" to close the dialog box - great.  I'm sure there was some good reason, a long time ago, why I unticked "Enable enhanced editing toolbar". I may remember it if I hit whatever problem it was causing, but things may have moved on since then. Thanks for your help: it should save me from losing carefully-built references in future.  Pam  D  21:32, 26 May 2014 (UTC)
 * You're very welcome; so happy I was able to help; I'm rather new at all this and giving advice seems beyond my realm; glad it worked! I took a look at your user page; thank you for all your contributions to Wikipedia—it's editors like you that keep it going! It's good that you'll have a bit of an easier time of it now.&mdash; D'Ranged 1  VTalk  22:40, 26 May 2014 (UTC)

1 June 2014 major update
This update adds support for "last1/first1, last2/first2" or any arbitrary "field1, field2" Documentation update to come later. Detailed changes described below.

In MediaWiki:RefToolbarMessages-en.js:
 * Add 6 new messages (5 field labels, 1 interface for the alt text on the "add another" button)

In MediaWiki:Gadget-refToolbarBase.js:
 * Adds the support for incrementable fields
 * Replaces the deprecated jQuery live function
 * Adds fallback for label fields missing from the messages - first look for a "label" attribute in the template. If neither exist, use the field name

In MediaWiki:RefToolbar.js:
 * Adds the support for incrementable fields
 * Removes some unnecessary code

In MediaWiki:RefToolbarConfig.js:
 * Make last/first, author, authorlink, editor-first, editor-last, and editor-link fields into incrementable fields
 * Remove coauthors
 * Make sure all templates include the "ref" field for Harvard references
 * Replace "work" with "website" in cite web
 * Replace "newspaper" with "work" and add a few fields like "agency" in cite news

-- Mr.Z-man 00:52, 1 June 2014 (UTC)

New version suggestions / problem
First, and definitely foremost, thank you for all your hard work—the ability to add multiples is especially amazing! I wish there were a more tangible way to show my appreciation for your excellent gadget, which is now much-improved.

Suggestions—simple, short-term

 * In the  template, please add   to the base group
 * Many times this template is used to reference news articles, which are usually dated. All the other templates include  in the base group; while   might be a better option, editors are going to use   anyway in some, if not most, cases.
 * For all templates, please include  and   in the base group
 * This will hopefully encourage editors to submit websites to the web archive, which will go a long way toward avoiding link rot.
 * Add  to   by default
 * As editors increase their archiving activity, they will be adding sites to the archive, which will result in the archive date being the current one.
 * Please add a  field (capturing deadurl) to all templates, falling immediately after the   and   fields
 * Currently, the default for this field is "yes"; if more editors are archiving live websites, this option is needed to show the site is still live. Over time, if enough editors are archiving sites on a regular basis, perhaps the default itself could be "no".
 * Please add the  field to ,  , and   directly after the   field
 * This is the English Wikipedia; as such, citations should be understandable in that language. Too often, I see citations to sources in other languages that fail to include a translated title; this is very frustrating.
 * Please switch the positions of  and   on the cite journal form
 * This would put the  field directly next to the   field, not preceding it in another column.

Suggestions—more complex

 * Please add an ability to change the default date format from the form itself
 * I don't know what the ratio of users in the U.S. vs. users in other English-speaking countries is; however, having the format default to  creates problems in U.S.-centric articles. While there are some excellent tools to convert all dates in an article to one format or another, it would be nice if the dates were entered in the proper way to start with (to use the format currently being used in the article).
 * This would also enable U.S. editors to change their default format when editing U.K.-centric articles.
 * I realize this is modifiable if an editor adds code to their .js file; however, many editors don't know to do this, or don't know how.
 * Ideally, this would be two buttons somewhere on the form labelled  and   which would set/change the date format in all date fields on the form.
 * Even more ideally, the button selection would be remembered, so the editor would only have to click it the first time s/he used the particular template unless they wanted to change formats when editing an article which used a format other than their chosen default.
 * Please add an incrementable button,  with two fields:   and
 * This would allow editors to modify the form to include parameters not listed, enabling the addition of the parameters to be included in the Preview and Parse options
 * This would avoid many errors in citations that are incurred when inputting additional parameters. Such errors include mis-spelling parameter names, placing the parameter outside the closing brackets, forgetting to put a pipe in front of the parameter name, leaving out the = sign, etc.
 * Ideally, the  field would be a drop-down list of all available parameters (not currently on the form) to ensure that the parameter name is spelled correctly.
 * When parsing the information, please strip out  if   starts with
 * web.archive.org URLs are automatically rendered as secure https; however, the site supports protocol-relative URLs; we should take advantage of this.

Problem
$('head').one('reftoolbarbase', function {  CiteTB.UserOptions['date format'] = " , ";   CiteTB.UserOptions['autodate fields'] = ['accessdate', 'archivedate', 'date'];   CiteTB.UserOptions['expandtemplates'] = true;   CiteTB.UserOptions['autoparse'] = true; });
 * I cannot for the life of me get the forms to expand to show extra fields by default. I use many of the fields that are not currently in the base area. Here's what I've added to my .js document:
 * All the other options are working correctly.

Thank you again for all your hard work and for your patience in dealing with my suggestions/problem.&mdash; D'Ranged 1  VTalk  20:47, 1 June 2014 (UTC)

Non-standard labels appearing as "null"
I recently added a new cite template for Cite patent in my vector.js, extract of of code is below. Whilst it appears in the dropdown list fine, when I launch the full window for adding the parameters, all labels except for the title parameter come up with "null". This doesn't matter if I have specified a custom label or not. I've experienced similar issues with some other templates in the past, but due to the limited number of parameters in those I have managed. Is this something I have done wrong? Thanks to anyone that can help. Themeparkgc  Talk  06:40, 18 July 2013 (UTC)

author link bug
Hi, If you go to extra fields in cite book, and try to add the "article=" field, it changes it to "authorlink1" instead on rendering. These are two very different things :) -- phoebe / (talk to me) 05:32, 8 September 2014 (UTC)
 * I can't reproduce this. First, which version are you using? Also, which button do you press next? -- Red rose64 (talk) 08:45, 8 September 2014 (UTC)

Video tutorial
I showed reftoolbar to another editor and she's struggling with it. I've found File:RefTools.ogv - is this so old as to be useless? Is there something, text or visual, that is better? Dougweller (talk) 19:47, 18 June 2014 (UTC)


 * The form has changed but the video is still helpful and any reasonable person should be able to adapt to the changed form after watching the video. Make sure you're friend hasn't customized their Wikipedia such that they don't even see the Reftoolbar. Jason Quinn (talk) 16:52, 21 September 2014 (UTC)