Last modified: 2014-06-03 22:40:55 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 T31446, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29446 - jquery.client.js: test is wrong for subversions >= 10
jquery.client.js: test is wrong for subversions >= 10
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Bartosz Dziewoński
: need-unittest
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-17 07:19 UTC by Michael M.
Modified: 2014-06-03 22:40 UTC (History)
6 users (show)

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


Attachments

Description Michael M. 2011-06-17 07:19:19 UTC
Steps to reproduce:
* Look at the WikiEditor source to see that it should work in Opera 9.6 and above.
* Edit a page with Opera 9.10.
* Observe that the old toolbar is shown.

It's obvious that Opera 9.10 isn't recognized as a version above 9.6, since as decimals 9.10 < 9.6.
Comment 1 Brion Vibber 2011-06-17 18:03:29 UTC
Marking this as 'need-unittest', should be added to the qunit test cases for the module.
Comment 2 Brion Vibber 2011-06-17 18:08:41 UTC
Looks like for proper testing, jquery.client module needs refactoring so we can pass it an arbitrary 'navigator' object to initialize its profile with.

Bits used:
* navigator.userAgent
* navigator.platform

The bits that add classes to the <html> root element probably also need to be kicked back so they can be re-triggered manually.
Comment 3 Michael M. 2011-06-18 07:55:50 UTC
Sorry, my example is wrong. Opera version numbers may be strange, but at least they manage always to use 2 digits. Opera 9.6 is probably meant to be 9.60, so everything is correct. I could find only one browser that uses 2-digit subversions inconsistently: ELinks 0.9 is earlier than ELinks 0.10. Since jquery.browser doesn't care about ELinks this bug probably can be ignored.
Comment 4 Krinkle 2011-06-21 17:46:03 UTC
(In reply to comment #2)
> The bits that add classes to the <html> root element probably also need to be
> kicked back so they can be re-triggered manually.

Yeah, they should be moved to mediawiki.wikipage.init.js (doesn't exist yet), which makes the module re-usable as well.

(In reply to comment #0)
> Steps to reproduce:
> * Look at the WikiEditor source to see that it should work in Opera 9.6 and
> above.
> * Edit a page with Opera 9.10.
> * Observe that the old toolbar is shown.
> 
> It's obvious that Opera 9.10 isn't recognized as a version above 9.6, since as
> decimals 9.10 < 9.6.

Can you verify this on trunk ? I remember fixing a similar issue a few months ago.
Comment 5 Brion Vibber 2011-06-21 17:54:55 UTC
To confirm, Opera's minor version number is used like a decimal, and 9.10 is older than 9.60:

http://www.opera.com/docs/history/#o960 9.60: October 2008
http://www.opera.com/docs/history/#o91 9.10: December 2006

There is no 'Opera 9.6' -- anything 'before' a '.10' is like '.01' or '.05' etc.


Firefox uses two, three, or at times even four-level version components where each component is an individual integer number which must be compared directly, The second (minor) level has never yet been greater than 9, but third/fourth components have, such as Firefox 2.0.0.14 or 3.6.18:

http://en.wikipedia.org/wiki/History_of_Firefox#Release_history


As such it's possibly not 100% safe to use the same comparison function for both, and other browsers might have yet other schemes. Really though we should rarely (hardly *ever*) be doing version-sniffing this brazenly; we should STRONGLY discourage use of this version checking module and instead be checking for actual feature compatibility as much as possible.

Are there specific browser features or bugs that we need to blacklist those versions of Opera for? Can they be detected more specifically?
Comment 6 Derk-Jan Hartman 2014-04-20 21:09:31 UTC
This was changed in commit a3ba3c52b892831a3ff3caf4d23135c639f46936

https://gerrit.wikimedia.org/r/95962
Comment 7 Matthew Flaschen 2014-06-03 22:40:30 UTC
Yeah, I think this was fixed by that.

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


Navigation
Links