Page MenuHomePhabricator

Math button's position unpredictible due to asynchronous load of toolbar parts
Closed, InvalidPublic

Description

Math edit button:
https://commons.wikimedia.org/wiki/File:Button_math.png

in MediaWiki edit button toolbar migrated from its standart position to the first position (to left on Czech projects in FF 28.0) and to the last postion (Czech language, Google Chrome). Please move it back to its possition.


Version: unspecified
Severity: normal
See Also:
T62471: move insert math button from EditPage to extension math
T30681: Native editButtons can't be removed or reordered through r86603

Details

Reference
bz64745

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:25 AM
bzimport added a project: Math.
bzimport set Reference to bz64745.
bzimport added a subscriber: Unknown Object (MLST).

Please provide steps to reproduce.

  1. Login in to cs.wv
  2. Preference- Editing - disable Enable enhanced editing toolbar
  3. open this page: https://cs.wikiversity.org/w/index.php?title=Diskuse_s_u%C5%BEivatelem:Danny_B.&action=edit&section=20

I have disabled "Enable enhanced editing toolbar" and opened the URL. I have no idea where and how to see a Math button, so the steps to reproduce miss some steps.

I disabled also "Show edit toolbar" but I have no idea how to get that ancient non-WikiEditor toolbar displayed that you might talk about (no idea, as no screenshot provided).

Czech Wikiversity, position of Math button at old edit toolbar. FF 29.0

Attached:

Math1.jpg (389×823 px, 47 KB)

cs.wv position of match button at old edit toolbar, Google Chrome 34.0.1847.131 m

Attached:

Math2.jpg (296×756 px, 35 KB)

I can confirm the problem (see below). CC'ing Math folks - any idea if something has changed in Math here that could have triggered this?

To reproduce: I disabled "Zapnout vylepšený panel nástrojů" now on https://cs.wikiversity.org/wiki/Speci%C3%A1ln%C3%AD:Nastaven%C3%AD#mw-prefsection-editing (sorry, I had interpreted "wv" as wikivoyage before, not as wikiversity; that's why I couldn't reproduce).

(In reply to Andre Klapper from comment #7)

I can confirm the problem (see below). CC'ing Math folks - any idea if
something has changed in Math here that could have triggered this?

To reproduce: I disabled "Zapnout vylepšený panel nástrojů" now on
https://cs.wikiversity.org/wiki/Speci%C3%A1ln%C3%AD:Nastaven%C3%AD#mw-
prefsection-editing (sorry, I had interpreted "wv" as wikivoyage before, not
as wikiversity; that's why I couldn't reproduce).

Well, I think the problem is broad. I think I saw it also on other project and I spoke about it with somone on IRC, that they saw it elsewhere. But without testing I cannot prove it.

physik wrote:

Yes. The code that creates the Math button was moved from core to the Math extension in https://gerrit.wikimedia.org/r/#/c/109923/

There is no way to specify the order of buttons in the (classic) toolbar, other than adding them (with mw.toolbar.addButton) in the desired order. Since the loading order of MW modules is decided by ResourceLoader, I believe the migration just made the code from Math extension to be executed earlier than it used to be when it was in core.

See also a similar "problem" (for the {{cite}} button) on this thread:
https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=607169851#The_little_toolbar_having_a_problem...
In that case, the button was previously added by a script, which was imported from MediaWiki:common.js, and the button moved to other position when the code was migrated into a RL-enabled gadget.

So it means, we can fix it in local javascript and there is no need to repair it internaly?

This is currently known issue related to the asynchronous loading of the toolbar buttons provided by server (aka core and extensions).

DJ & Krinkle are jsut discussing this @ Hackathon...

Maybe this could be solved by providing another hook inside of getEditToolbar to allow extensions to modify the content of $toolarray?
https://github.com/wikimedia/mediawiki-core/blob/master/includes/EditPage.php#L3641

See also bug 28681 and r86942 (and then gerrit change 16238).

He7d3r set Security to None.
Jdforrester-WMF subscribed.

The 2006 wikitext editor, to which this refers, has been removed from MediaWiki and Wikimedia servers, and so this task is no longer valid.