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".
Version: unspecified
Severity: normal
scfc | |
Apr 14 2012, 9:52 PM |
F9202: error.PNG | |
Nov 22 2014, 12:19 AM |
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".
Version: unspecified
Severity: normal
Only extension I can find using the 'rangy' library is VisualEditor, which shouldn't be loading anything on the home page...
(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").
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...
Konqueror 4.8.2 "release 491" on same VM .... also no problems visible at http://www.mediawiki.org/ when logged in.
What's your engine set to? With "WebKit" I see no problems as well, they occur with "KHTML" (the default setting).
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).
timdown wrote:
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.
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?
timdown wrote:
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:
(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:
Disabling all of them doesn't get rid of the Rangy message.
timdown wrote:
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.
(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.
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 minimizeJavaScript 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.
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!