Page MenuHomePhabricator

Inserting via MediaWiki:Edittools no longer working
Closed, ResolvedPublic

Description

Clicking an element defined by https://de.wikivoyage.org/wiki/MediaWiki:Edittools in edit mode has no effect.

Details

Related Gerrit Patches:
mediawiki/extensions/CharInsert : wmf/1.27.0-wmf.16Revert "Remove inline event handler js from charinsert"
mediawiki/extensions/CharInsert : masterRevert "Remove inline event handler js from charinsert"

Event Timeline

In an attempt to fix it I emptied it, but now reverted.

It all seems to work for me now. (Testing on https://de.wikivoyage.org/w/index.php?title=J%C3%BChnde&action=edit, a random page.)

Strange... sometimes it works, sometimes not.

I have just reported similar problem on Czech Wikipedia: T129667: Inserting characters from MediaWiki:Edittools broken

Duplicate? Unbreak now!?

This is also affecting the Dutch Wikipedia.

Hinote added a subscriber: Hinote.EditedMar 11 2016, 6:30 PM

Same for the Russian Wikisource. Please fix it ASAP!

Copying from T129667 :

browser console reports: Use of "insertTags" is deprecated. Use mw.toolbar.insertTags instead.
This could be Regression introduced by rECHIb2f7c4c507e5.

Yeah its my fault. The js gadget makes fragile assumptions about what html output is.

See also thread on COM:VP.

Yeah its my fault. The js gadget makes fragile assumptions about what html output is.
See also thread on COM:VP.

I misread that as being about the mediawiki:edittools.js file that's somewhat popular gadget. But this sounds like an issue in general, which sounds separate.

@Bawolff, should we be reverting the CharInsert change? or do gadgets need to be fixed?

I have no idea whats going on here. I wasnt able to reproduce the issue on the linked sites

https://nl.wikipedia.org/wiki/MediaWiki:Onlyifediting.js changes the edit tools a bit, didn't look at the default on-Gadgets.

If we can't identify the cause, I'd rather revert than leave it broken over the weekend...

I can reproduce on that page on firefox. I wont be able to debug this until tomorrow.

If this is causing people large problems, I dont have any objections to reverting.

Change 276931 had a related patch set uploaded (by Legoktm):
Revert "Remove inline event handler js from charinsert"

https://gerrit.wikimedia.org/r/276931

Change 276931 merged by jenkins-bot:
Revert "Remove inline event handler js from charinsert"

https://gerrit.wikimedia.org/r/276931

Change 276932 had a related patch set uploaded (by Legoktm):
Revert "Remove inline event handler js from charinsert"

https://gerrit.wikimedia.org/r/276932

Change 276932 merged by jenkins-bot:
Revert "Remove inline event handler js from charinsert"

https://gerrit.wikimedia.org/r/276932

Mentioned in SAL [2016-03-12T04:44:03Z] <legoktm@tin> Synchronized php-1.27.0-wmf.16/extensions/CharInsert/: Revert "Remove inline event handler js from charinsert" - https://gerrit.wikimedia.org/r/#/c/276932/ T129524 (duration: 00m 29s)

Legoktm closed this task as Resolved.Mar 12 2016, 4:47 AM
Legoktm claimed this task.
Legoktm raised the priority of this task from High to Unbreak Now!.

Reverted, and confirmed that the edit tools work fine on nl.wp. Please let me know if you're still seeing brokenness. Sorry about the trouble :(

Reverting this change means that CharInsert edittools no longer work if the preference Show edit toolbar is disabled, as reported at T88922#2081286. I reopened that task.

Rillke added a subscriber: Rillke.Mar 14 2016, 11:53 PM

btw, I finally got around to debugging this.

Cause appears to be setting the innerHTML of the element containing charinsert tags. This caused those elements to loose their event handlers (At least in firefox). It didn't matter in the old version, since the event handlers were inline.

I'll work on trying to update those gadgets.

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptMay 16 2016, 10:07 AM

btw, I finally got around to debugging this.
Cause appears to be setting the innerHTML of the element containing charinsert tags. This caused those elements to loose their event handlers (At least in firefox). It didn't matter in the old version, since the event handlers were inline.
I'll work on trying to update those gadgets.

For reference, a modified version of the gadget at nlwiki is at https://nl.wikipedia.org/wiki/Gebruiker:Bawolff/sandbox.js

It appears that some wikis have some more modern versions of the gadget, which might not exhibit the same problem

Bawolff added a comment.EditedMay 16 2016, 2:58 PM

Ok, so we're going to try this change again: https://gerrit.wikimedia.org/r/#/c/288922/

However, before that I'm hoping to get the scripts that I know will break fixed.

Wikis that have been fixed

  • nlwiki
  • dewikivoyage
  • ruwikisource
  • commonswiki
  • mediawikiwiki
  • cswiki

(If anyone is aware of any other wikis that broke last time around, please let me know)

Looks like cswiki has been fixed now, and bawolff has permissions to fix mw.o so I assume he intentionally left it broken? I'm going to merge the patch now.

Base added a subscriber: Base.Jun 2 2016, 11:57 PM

We have a problem on uk.wikiquote with charinsert in MediaWiki:Wikimedia-copyrightwarning not working now. Is it related?

We have a problem on uk.wikiquote with charinsert in MediaWiki:Wikimedia-copyrightwarning not working now. Is it related?

Most likely. Ill look into it.