Page MenuHomePhabricator

Customized legacy edit toolbar does not always load correctly
Closed, DeclinedPublic

Description

Missing scan and edit toolbar

I am posting three separate bugs and mentioning this in this first report because they are somewhat related.

The user defined edit toolbar, defined in my very simple
https://en.wikisource.org/wiki/User:Ineuw/common.js stopped functioning in this latest version of the mw software. In versions previous, it worked reliably and always, permitting me greatly increased productivity. The toolbar does show up intermittently and occasionally.

Regardless of the toolbutton definition syntax used, the same intermittent functioning is the result. The syntax is either the current definition one, or an older one:

mw.toolbar.addButton(

'',
' Æ ',
'Æ',
'',
'',
''

);

I also used the definitions without image buttons, thinking that this may be the cause, but it doesn't make a difference.

The problem is also not browser related. I tried other browsers and OS's as well:

Firefox in Windows, Xubuntu, and Apple OSX.
Safari in Windows and Apple OSX.
Google Chrome in Windows and Linux (Xubuntu).
but the intermittent behaviour is the same. . . . .

Finally, this is also true on the Commons and Wikipedia, where it's less critical because I am not so active on those wikis.

Please see attached image.


Version: master
Severity: normal

Attached:

Missing_scan_and_toolbar.jpg (558×1 px, 63 KB)

Details

Reference
bz54308

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 2:00 AM
bzimport added a project: WikiEditor.
bzimport set Reference to bz54308.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 13321
edit toolbar is showing occasionally

Attached:

Blank_djvu_scan_in_edit_mode_but_toolbar_showing.jpg (634×1 px, 106 KB)

Hi ineuw,

your screenshot looks like the old toolbar to me, instead of the WikiEditor toolbar. Is that intended or part of the problem?

The WikiEditor toolbar should look like your screenshot in https://bugzilla.wikimedia.org/attachment.cgi?id=13323

I went to
https://en.wikisource.org/w/index.php?title=Page:Popular_Science_Monthly_Volume_63.djvu/155&action=edit
to reproduce the problem (Firefox 23.0.1) and switched to horizontal layout.

I also copied your "common.js" file to my user account (the file basically just has a number of "mw.toolbar.addButtons" calls).

The scanned image still loads for me, and I get the correct WikiEditor toolbar, but in Firefox' Error Console I get:

Timestamp: 09/19/2013 11:52:12 AM
Error: TypeError: mw.toolbar is undefined
Source File: https://bits.wikimedia.org/en.wikisource.org/load.php?debug=false&lang=en&modules=user&only=scripts&skin=vector&user=AKlapper+%28WMF%29&version=20130919T095201Z&*
Line: 1

I have bug 47872 in mind.

Hi. I am sorry to confuse you. The new edit toolbar was activated so that I could take a proper snapshot and I forgot to turn it off. Otherwise, it's not usable for me at the moment.

Wikisource users, who use edit toolbar buttons, use the "legacy" old style because it's more versatile. For my main project work of Popular Science Monthly, I only need the 12-14 extended ANSI to accommodate French and German and occasionally Greek.

I am also working on Hebrew/Arabic texts, and not being able to access the dropdown box of character selections, this forced me to try using the "advanced" WikiEditor toolbar in which my language setting places things in reverse order.

I am attaching what should be the correct display of the legacy toolbar when it works.

Created attachment 13324
Legacy edit toolbar displayed.

Attached:

Legacy_edit_toolbar_showing.jpg (633×1 px, 131 KB)

Created attachment 13325
old style toolbar coding

This text contains the legacy toolbar layout, without captions by the elements, no images, and notice the function syntax difference. It doesn't matter which I use, the behaviour is identical.

mw.toolbar.addButton(

and NOT

mw.toolbar.addButtons(

Attached:

Created attachment 13327
Character selection moved too low in new mw software version

To the attention of Andre Klapper

This is the missing image of the drop down character set selector

Attached:

Character_selection_way_too_low_to_see_original_text.jpg (720×1 px, 144 KB)

To quote Krinkle:
"The classic edit toolbar has long been deprecated. The default was replaced
with WikiEditor on Wikimedia in a 2010 deployment", plus VisualEditor is also around the corner.
Setting lowest priority, might be even a WONTFIX.

I am not the only one who is using the toolbar at Wikisource. While other users have occasional issues, theirs seem to work on most cases.

I also got the same Firefox (23.0.1) error as Andre Klapper. If this seems to be the cause, can't it be corrected?

Finally, this is a very big disappointment because the replacement option is very awkward. Among other things, it takes up (and unnecessarily) a lot of screen real estate and I work on a 22" screen. Krinkle's opinion is akin to taking away a mechanic's trusted tools because he doesn't personally favor them. He should try his hand at some proofreading for a day or two.

(In reply to comment #8)

I also got the same Firefox (23.0.1) error as Andre Klapper. If this seems to
be the cause, can't it be corrected?

It might either be an issue in your code in common.js, or some changes in MediaWiki. Apart from Alex' cleanup which got merged at the beginning of September I cannot see any changes in
https://git.wikimedia.org/history/mediawiki%2Fcore.git/HEAD/resources%2Fmediawiki.action%2Fmediawiki.action.edit.js

Finally, this is a very big disappointment because the replacement option is
very awkward. Among other things, it takes up (and unnecessarily) a lot of
screen real estate and I work on a 22" screen.

I don't see that big difference in size. Not sure if we refer to the same things?
The legacy toolbar had enough issues (e.g. it was never meant to be expanded so inserting required exposing and dealing with implementation details) so it got replaced by the current toolbar.

I ask that this bug be closed, since I accepted the demise of the old wiki toolbar.