Page MenuHomePhabricator

webkit problems with reftool site JS on en.wikipedia
Closed, InvalidPublic

Description

From [[WP:VPT#Reftool 1.0 failing when filling fields from URL]]:

I use Reftools 1.0 because it can grab data and fill in fields when given the source URL. When I use it today, instead of filling in the fields, I find that I'm no longer in edit more and I'm looking at the "Read" version of the article. The browser is Chrome.
I have the same problem, not just in Chrome but also in Safari.


Version: unspecified
Severity: normal

Details

Reference
bz31430

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:50 PM
bzimport set Reference to bz31430.
bzimport added a subscriber: Unknown Object (MLST).

What's reftools? Is it a gadget or someone's user script?

I believe people are referring to [[User:Mr.Z-man/refToolbar]] which, as the docs point out, is now part of the wikieditor's toolbar. See [[File:RefTools.ogv]] for more info.

This looks like some sort of local site JS or gadget that plugs into WikiEditor; there's no sign of it in WikiEditor's source.

Hrm... Reedy/Roan tell me it is a local mod. Sorry for the noise.

https://en.wikipedia.org/w/index.php?title=MediaWiki:RefToolbar.js etc

If the problem exists, no sense closing the bug. Reassigned to general Wikimedia group as it's not part of WikiEditor ext.

Can you provide a sample source URL to use and exact steps to reproduce? I'm not sure where to put a URL for it to "grab data"...

joedecker wrote:

I got asked for a test case. The simplest example is this:

  • Make sure reftools is enabled
  • Make sure " Enable enhanced editing toolbar " is *disabled* in editing prefs.
  • Edit an article (sandbox or whatever is fine)
  • Press the square "cite" button
  • Press the "Book" button. Note that a "form" appears.
  • Insert the following URL in the URL field:

http://books.google.com/books?id=ke02t2OyPDsC&pg=PT7&dq=we+were+somewhere+around+barstow+on+the+edge+of+the+desert&hl=en&ei=RG6OTuvcFYeqsQK8-8GaAQ&sa=X&oi=book_result&ct=result&resnum=1&sqi=2&ved=0CC0Q6AEwAA#v=onepage&q=we%20were%20somewhere%20around%20barstow%20on%20the%20edge%20of%20the%20desert&f=false

(Most results from any Google Book search should suffice.)

  • Press he green icon to the right of the URL field.

EXPECTED RESULT:

After a delay, many of the other fields in the form that pops up should be filled in, but the "form" that appeared when we pressed the Book button is left up.  (After this, you should be able to press "Add citation" to have wikimarkup for the reference inserted into the article, which should close the form but insert the newly created reference in the text at the text insertion point, but I can't get that far right now.)

OBSERVED RESULT AFTER UPGRADE:

The page is refreshed, the form is closed, the URL and other fields are not inserted in the

The "News" option works similarly, but does its best work with a subset of New York Times articles, the "Books" use case I gave above is the probably the best single test case I can come up with.)

Feel free to drop me a note on my talk page (I'm on enwiki as "Joe Decker") if I can be of any assistance.

Thanks!

--j

whpq wrote:

I was the editor who reported the problem originally. Joe Decker has described the problem, expected results, and actual results perfectly. That is exactly the same thing that is happening to me. I am available to provide additional info or assist as well. I'm on enwiki as "whpq"

This is a weird one. It seems the input type="image" triggers the submit action for some reason. If i change it to type="button", the problem is gone...

Right, an input=image IS a submit action. So probably before there was a bug in jquery that intercepted the submit action, this bug was fixed, and the Reftools script now behaves 'as it ought to' only is that not the desired behavior. Will fix the script to cancel the event.

I *think* this is still being reported: http://en.wikipedia.org/w/index.php?diff=455243842

Have you had a chance to do anything with this yet?

joedecker wrote:

I am now seeing the issue I described as "fixed". The URL I provided above works with the cite book template, and the following URL works with the cite news template:

http://query.nytimes.com/gst/fullpage.html?res=9A02EFD81438F936A35755C0A9639C8B63&pagewanted=2

I have not (yet) looked at the link Mark provided in the comment immediately above.

Cut-n-paste from WP:VPT: "The cite button in the toolbar. Cite book and web don't look up the information anymore. Instead, it submits the form and I end up saving an edit I was only halfway done with."