Last modified: 2014-02-05 14:35:44 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 T37979, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35979 - "Rangy not supported in your browser. Reason: Neither Range nor TextRange are implemented"
"Rangy not supported in your browser. Reason: Neither Range nor TextRange are...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-14 21:52 UTC by Tim Landscheidt
Modified: 2014-02-05 14:35 UTC (History)
5 users (show)

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


Attachments
This error is coming on some clicks. (8.34 KB, image/png)
2014-02-05 11:03 UTC, 777preethi
Details

Description Tim Landscheidt 2012-04-14 21:52:41 UTC
Accessing http://www.mediawiki.org/ as a logged-in user with Konqueror 4.8.1, every page pops up a JavaScript alert: "Rangy not supported in your browser. Reason: Neither Range nor TextRange are implemented".
Comment 1 p858snake 2012-04-14 22:00:06 UTC
Does it also happen on test2 (Also 1.20wmf1) or any other projects?
Comment 2 Brion Vibber 2012-04-14 22:34:22 UTC
Only extension I can find using the 'rangy' library is VisualEditor, which shouldn't be loading anything on the home page...
Comment 3 Tim Landscheidt 2012-04-14 23:26:22 UTC
(In reply to comment #1)
> Does it also happen on test2 (Also 1.20wmf1) or any other projects?

Not on test2.wikipedia.org, but on translatewiki.net (as an anonymous user).

(In reply to comment #2)
> Only extension I can find using the 'rangy' library is VisualEditor, which
> shouldn't be loading anything on the home page...

It occurs already on the Special:UserLogin "Login successful" page ("Anmeldung erfolgreich").
Comment 4 Brion Vibber 2012-04-14 23:32:01 UTC
Tested Konqueror 4.7.2 "release 5" (openSUSE 12.1), no problems on home page (or even on Special:VisualEditorSandbox). Trying an update to KDE 4.8...
Comment 5 Brion Vibber 2012-04-15 00:27:08 UTC
Konqueror 4.8.2 "release 491" on same VM .... also no problems visible at http://www.mediawiki.org/ when logged in.
Comment 6 Tim Landscheidt 2012-04-15 01:03:47 UTC
What's your engine set to?  With "WebKit" I see no problems as well, they occur with "KHTML" (the default setting).
Comment 7 Brion Vibber 2012-04-15 01:11:51 UTC
It's set at "WebKit" by default for me.

No visible error messages if I switch to "KHTML", either on http://www.mediawiki.org (logged in) or http://translatewiki.net (logged out).
Comment 8 Tim Landscheidt 2012-04-15 02:20:07 UTC
Did you quit and start a new instance of Konqueror after changing the setting?
Comment 9 Tim Down 2012-06-13 17:17:42 UTC
Rangy's author here.

This could be a Rangy bug, or at least something Rangy can address. Rangy checks for the existence of all of the standard DOM Level 2 Range methods to determine whether Range is properly supported by the browser so it's possible KHTML is missing one or more of those.

I'll look into it.
Comment 10 Roan Kattouw 2012-06-13 17:39:26 UTC
The only code I see adding Rangy to the page is in SpecialVisualEditorSandbox.php, and that code is only run on, you guessed it, Special:VisualEditorSandbox.

Given that this only happens when logged in, do you have a user script or gadget enabled that uses rangy maybe?
Comment 11 Tim Down 2012-06-13 23:44:21 UTC
Roan: There are a couple of Chrome plugins I've heard of that use Rangy, so it's possible.

Regardless of the specifics of this bug for MediaWiki, it's a general problem for Rangy. A minor oversight in KHTML's Range implementation is responsible for the error message, so I will be fixing Rangy to be less pedantic. The bug is here:

https://code.google.com/p/rangy/issues/detail?id=113
Comment 12 Tim Landscheidt 2012-09-12 20:52:38 UTC
(In reply to comment #10)
> The only code I see adding Rangy to the page is in
> SpecialVisualEditorSandbox.php, and that code is only run on, you guessed it,
> Special:VisualEditorSandbox.

> Given that this only happens when logged in, do you have a user script or
> gadget enabled that uses rangy maybe?

I don't have any user scripts on mediawiki.org; the gadgets section of the preferences list as enabled:

- Edittools
- WMF Project Status Helper
- <gadget-enwp-boxes>

Disabling all of them doesn't get rid of the Rangy message.
Comment 13 Tim Down 2012-09-13 09:27:19 UTC
Tim,

The problem is that KHTML's Range implementation is missing some constants (required by DOM Level 2 Range spec) that Rangy expects. I've relaxed the relevant tests in Rangy for the upcoming version 1.3 to work around this. See 

https://code.google.com/p/rangy/issues/detail?id=113

I created a bug on the KHTML bug tracker (https://bugs.kde.org/show_bug.cgi?id=301871) but since it has been so far ignored, the best solution is for MediaWiki to use a newer version of Rangy. I would be happy to do a new 1.2 release with this fix while 1.3 is still in alpha.
Comment 14 Tim Landscheidt 2012-09-14 13:08:30 UTC
(In reply to comment #13)
> The problem is that KHTML's Range implementation is missing some constants
> (required by DOM Level 2 Range spec) that Rangy expects. I've relaxed the
> relevant tests in Rangy for the upcoming version 1.3 to work around this. [...]

I've read and appreciate it; I just wanted to answer Roan's questions.

  I understand that the purpose of the ResourceLoader effort was to minimize JavaScript loading and execution; the running of the Visual Editor's code on a normal page view would suggest that something's amiss here.
Comment 15 Tim Landscheidt 2012-11-22 04:25:25 UTC
This seems to have been fixed at least on mediawiki.org as messages appear no more.

> [...]
>   I understand that the purpose of the ResourceLoader effort was to minimize
> JavaScript loading and execution; the running of the Visual Editor's code on a
> normal page view would suggest that something's amiss here.

I assume this has either been dealt with or is not important.
Comment 16 777preethi 2014-02-05 11:03:17 UTC
Created attachment 14494 [details]
This error is coming on some clicks.
Comment 17 Andre Klapper 2014-02-05 14:35:44 UTC
777preethi: Please see https://www.mediawiki.org/wiki/How_to_report_a_bug and create a new ticket with sufficient information to reproduce your setup. Thank you in advance!

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


Navigation
Links