Page MenuHomePhabricator

Several JavaScript extensions (Custom tab, CategoryTreeSection) on de.wikisource broke recently
Closed, DeclinedPublic

Description

Author: seb77rze

Description:
Since about between 29.04. 19:30 and 30.04. 06:44 (CEST) several features on de.wikisource have been halted to function. These include:

  1. the Korrekturlesen Button (Tab) of PR1 (old proofread mechanism see below) projects has disappeared

e.g. see the page http://de.wikisource.org/wiki/RE:Adsertor
On the right of the tab Beobachten=Watch there should be and has been a tab Korrekturlesen. This tab has invoked http://de.wikisource.org/w/index.php?title=RE:Adsertor&action=edit&image=/wiki/Pauly-Wissowa_I,1,_0421.jpg
The &image syntax is working (as demonstrable if you click the [423] page number), only the tab has disappeared.
(At the moment the function of the Korrekturlesen Tab is temporalily imitated by a code that produces [Korrecturlesen] in the text itself, see
http://de.wikisource.org/w/index.php?title=Vorlage:RE&diff=next&oldid=1795826
)
Speculation: if i am correct, the Korrekturlesen tab is created by JS code in
http://de.wikisource.org/w/index.php?title=MediaWiki:Monobook.js

  1. Ausklappen/Einklappen = fold out/in does not work on page

http://de.wikisource.org/wiki/Kategorie:Paulys_Realencyclop%C3%A4die_der_classischen_Altertumswissenschaft
but things are always folded out.
Folding in/out works by code in
http://de.wikisource.org/w/index.php?title=Vorlage:TOC_Gro%C3%9Fe_Kategorie&action=edit

  1. Fold in/out does not work in the last line (Linkvorlage für WP) of the infobox of pages like

http://de.wikisource.org/wiki/RE:Adsertor
This feature is implemented in
http://de.wikisource.org/w/index.php?title=Vorlage:RE&action=edit
by the code
colspan="2" style="background-color: #f3f3f3;" align="center" |<table class="collapsible collapsed"
etc.

  1. There are problems also with PR2 projects (new ProofRead Extension) described in the below cited discussion, and perhaps connected with this bug. But there people speak of intermittent bugs, so it may be some other problem which aroused at the same time.

Our bugs in 1) to 3) are not intermittent and independent of user side OS and browser.

Discussion about the bug family is going on in de.ws
http://de.wikisource.org/wiki/Wikisource:Skriptorium#ADB:_Wo_ist_der_.22Korrekturlesen.22-Button_.3F
and in the following two sections (in German).
A speculation has been that this bug in caused by Change_to_section_edit_links,
but it seems that this is not the case (see http://meta.wikimedia.org/wiki/Talk:Change_to_section_edit_links#de.wikisource_paralysed) because of the slightly earlier appearence of the bug.

Situation is very frustrating, severity is major to critical.


Version: wmf-deployment
Severity: major
Whiteboard: aklapper-moreinfo

Details

Reference
bz48182

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:16 AM
bzimport set Reference to bz48182.
bzimport added a subscriber: Unknown Object (MLST).

Thanks for forwarding this to Bugzilla.

I wonder if this stuff is related to bug 47457 comment 64 / bug 47872 (custom toolbar buttons - maybe not).

German discussion about these problems: http://de.wikisource.org/wiki/Wikisource:Skriptorium#.5Ben.5D_Change_to_section_edit_links

(In reply to comment #0)

Since about between 29.04. 19:30 and 30.04. 06:44 (CEST) several features on
de.wikisource have been halted to function.

Initially I had the deployment of 1.22wmf3 in mind, but that only took place on May 1st: https://www.mediawiki.org/wiki/MediaWiki_1.22/Roadmap

  1. the Korrekturlesen Button (Tab) of PR1 (old proofread mechanism see below)

projects has disappeared
e.g. see the page http://de.wikisource.org/wiki/RE:Adsertor
On the right of the tab Beobachten=Watch there should be and has been a tab
Korrekturlesen.

Note: Link to reproduce is http://de.wikisource.org/wiki/RE:Adsertor?useskin=monobook as the "Beobachten" button is already a hack only for the Monobook skin (not shown in Vector skin).

This tab has invoked
http://de.wikisource.org/w/index.php?title=RE:Adsertor&action=edit&image=/
wiki/Pauly-Wissowa_I,1,_0421.jpg
The &image syntax is working (as demonstrable if you click the [423] page
number), only the tab has disappeared.
(At the moment the function of the Korrekturlesen Tab is temporalily imitated
by a code that produces [Korrecturlesen] in the text itself, see
http://de.wikisource.org/w/index.php?title=Vorlage:RE&diff=next&oldid=1795826
)
Speculation: if i am correct, the Korrekturlesen tab is created by JS code in
http://de.wikisource.org/w/index.php?title=MediaWiki:Monobook.js

Correct. "Beobachten" is not even displayed in Vector ( http://de.wikisource.org/wiki/RE:Adsertor?useskin=vector ), so it really requires Monobook ( http://de.wikisource.org/wiki/RE:Adsertor?useskin=monobook ) to get "Beobachten" displayed in Firefox.

Funny enough, when I copy that script, remove the "function ProofReadLink()" line and run it locally as a Greasemonkey script, it DOES display the tab.

  1. Ausklappen/Einklappen = fold out/in does not work on page

http://de.wikisource.org/wiki/Kategorie:
Paulys_Realencyclop%C3%A4die_der_classischen_Altertumswissenschaft
but things are always folded out.
Folding in/out works by code in
http://de.wikisource.org/w/index.php?title=Vorlage:
TOC_Gro%C3%9Fe_Kategorie&action=edit

Looks like CategoryTreeSection is used here. Firefox JavaScript console says:

Timestamp: 05/07/2013 12:11:32 PM
Error: TypeError: hasClass is not a function
Source File: http://bits.wikimedia.org/de.wikisource.org/load.php?debug=false&lang=de&modules=site&only=scripts&skin=monobook&*
Line: 6
which is

function createCollapseButtons(){
var tableIndex=0;
var NavigationBoxes=new Object();
var Tables=document.getElementsByTagName('table');
for(var i=0;i<Tables.length;i++){
if(hasClass(Tables[i],'collapsible'))

I'm curious if the change by Tpt for bug 48531 in https://de.wikisource.org/w/index.php?title=MediaWiki%3ACommon.js&diff=2003222&oldid=1803972 also fixes this problem. If that is the case, please mark as duplicate.

seb77rze wrote:

Thank you very much for your help.

Subproblem 1) Not solved, can not see change in behaviour.

Subproblem 2) Solved, and default is folded in, everything OK.

Subproblem 3) Solved, but default has been inverted to not collapsed.
Also tested with simple code sample at http://www.mediawiki.org/wiki/Manual:Collapsible_elements#Markup:

{| class="collapsible collapsed wikitable"

-

! This is the header cell, which is always shown

-
This cell is not shown by default.
}

seb77rze wrote:

Subproblem 3) default status solved by change to mw-collapsed
(http://de.wikisource.org/w/index.php?title=Vorlage%3ARE&diff=2003428&oldid=1997694)
(Just wondering how it is that the deprecated code works at all.)

seb77rze wrote:

Subproblem 1) Automagically solved, the Korrekturlesen tab has reappeared.
Just do not have any idea, what solved the problem?

seb77rze wrote:

Similar fix at http://de.wikisource.org/w/index.php?title=Vorlage:BLK%C3%96&diff=prev&oldid=2003432 shows, that Korrekturlesen Button appears because of mw-collaps. has been renamed. Perhaps error in collapsible prevents the execution of code creating the Korrekturlesen code?

(In reply to comment #3)

Subproblem 2) Solved, and default is folded in, everything OK.

(In reply to comment #4)

Subproblem 3) default status solved by change to mw-collapsed

(In reply to comment #5)

Subproblem 1) Automagically solved, the Korrekturlesen tab has reappeared.

That means that all is fine now and that this report can be closed?

seb77rze wrote:

There are still some minor problems with some JS on de.WS, but
yes, thank you.