Last modified: 2012-07-26 18:39:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40663, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38663 - [Regression] WikiEditor "Table" dialog broken
[Regression] WikiEditor "Table" dialog broken
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikiEditor (Other open bugs)
master
All All
: Unprioritized major (vote)
: ---
Assigned To: Krinkle
: code-update-regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-25 08:43 UTC by Cristian Falcas
Modified: 2012-07-26 18:39 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Cristian Falcas 2012-07-25 08:43:34 UTC
When using the WikiEditor to add a new table, the following message is printed:

"You have not entered a valid number of rows or columns."

It seems that in jquery.wikiEditor.dialogs.config.js, line 837, the following expression return true:

if ( isNaN( rows ) || isNaN( cols ) || rows != rowsVal  || cols != colsVal )

From my tests, the culprit is rows !== rowsVal. It looks like one is a number and the other a string. Adding the following alert

alert (mw.msg(rows !== rowsVal)+mw.msg(rows)+mw.msg(rowsVal)+mw.msg(typeof rows)+mw.msg(typeof rowsVal));

uotputs this:

<true><3><3><number><string>

Currently I had to update the js script to remove the strict equality operators:

if ( isNaN( rows ) || isNaN( cols ) || rows != rowsVal  || cols != colsVal )
Comment 1 matanya 2012-07-25 08:47:21 UTC
How Can we reproduce this? adding a table on en.wiki works. on which version of
wikimedia are you?
Comment 2 Cristian Falcas 2012-07-25 08:51:40 UTC
How can I found out?

I'm on master branch on extensions and mediawiki:

[root@localhost wiki]# git branch -r | sort -V
  origin/HEAD -> origin/master


[root@localhost WikiEditor]# git branch -r | sort -V
  origin/HEAD -> origin/master
  origin/master
  origin/wmf/1.20wmf1
Comment 3 matanya 2012-07-25 08:52:52 UTC
check at [[special:version]] on the wiki.
Comment 4 Cristian Falcas 2012-07-25 08:54:59 UTC
MediaWiki 	1.20alpha (2cc3faa)

WikiEditor (Version 0.3.1) 	(b88a866)
Comment 5 Cristian Falcas 2012-07-25 09:14:37 UTC
I'm not sure if this is the correct way, but I've done this:

git reset --hard e0adfee

and checked in the new file the comparison. It was also without strict.
Comment 6 Michael M. 2012-07-26 09:29:20 UTC
I can reproduce this on mw.org i.e. with 1.20wmf8:
Open a page for editing, click the icon to insert a table, leave everything as it is, click insert.
Adding Krinkle to CC list, since probably https://gerrit.wikimedia.org/r/#/c/14014/ broke this.
Comment 7 Krinkle 2012-07-26 18:28:04 UTC
rephrasing bug to be about the dialog (not the button). The basic table inserter (the default setting) works fine, the bug is in the dialog opt-in feature.

Regardless, this is indeed a regression from I445639b25a9688b3cdf9e5449e3d31cbcfa9c7ae.

My lint sweep exposed an oddity that was already in the code, fixing now.
Comment 8 Krinkle 2012-07-26 18:39:03 UTC
Fixed in If32da14f80c6a0e4be3e1fe7fd0b650be4ed8a09.

As soon as it is reviewed I will request backport to 1.20wmf8. Expect deployment within 24h.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links