Sitepatching updates

tweaking the broken code until it works, one site at a time

Unbreak Dojo 1.7

,

Hey, Ola was away last week so I get to do a guest post again smile I've shipped a small and urgent update for 11.62 only.

Added patches
PATCH-616 Make document.attachEvent extra undefined for Dojo 1.7.x

This is a workaround for CORE-45475, a subtle bug which causes problems for Dojo. An affected page like this demo caused console errors saying Uncaught exception: Error: WRONG_THIS_ERR.

Dojo says
has.add("ie-event-behavior", doc.attachEvent && (typeof opera === "undefined" || opera.toString() != "[object Opera]"));

which worked just fine until we tried hiding document.attachEvent and introduced a bug: even though doc.attachEvent on its own evaluates to false, when the && operator is used the engine will evaluate the second part too and return the first part if the second part evaluates to true. The returned function is later called in a way that makes it throw a "wrong this object" type error.

First we noticed this in Dojo demos, and I wasn't sure if it was a problem on production sites. However, when a user reported problems loading a local Norwegian bank and the Dojo issue turned out to be the root cause, we whipped up a patch.

Sina, GoogleTV, Kuwait AirwaysMS community

Comments

Hallvord R. M. Steenhallvors Monday, April 16, 2012 3:30:20 PM

Oh, and Ola will have to update Github in due course, as he hasn't told me the password yet :-)

Charles SchlossChas4 Monday, April 16, 2012 4:39:35 PM

Still seeing

Target version and time stamp of the active browser.js file is Opera Desktop 11.62 core 2.10.229, April 12, 2012. Active patches: 180 .

not sure what this ones date should be

Hallvord R. M. Steenhallvors Monday, April 16, 2012 9:38:17 PM

It's correct

ouzowtfouzoWTF Tuesday, April 17, 2012 4:35:17 PM

OT: Whats the cause, that pictures on droplr are shown very small until you reload the page? Page issue or Opera bug?

example: http://d.pr/i/IExr

rseiler Tuesday, April 17, 2012 7:42:39 PM

Hi guys. This regression happened sometime in the last week or two and is present in 11.62 all the way through 1372: Microsoft forums, which were corrected in a couple different areas with browser.js last year, no longer let you submit a message. Nothing happens when you try. I'm seeing this with the following browser.js versions, at least:

Opera Desktop 12.00 core 2.10.289, April 10, 2012. Active patches: 170
Opera Desktop 11.62 core 2.10.229, April 12, 2012. Active patches: 180

Example URL:
http://social.technet.microsoft.com/Forums

Ned the NaniteNedTheNanite Wednesday, April 18, 2012 7:45:35 PM

Ever since I got this (or the previous) update I've been experiencing speed issues using Google+ and Amazon.com. It'll work fine for a while but at some seemingly random interval Opera hits 90% CPU usage and everything slows to a crawl until I close the offending tab(s).

Anyone else noticed this?

Swapnil RustagiSwapnil99pro Thursday, April 19, 2012 4:32:58 PM

Originally posted by rseiler:

This regression happened sometime in the last week or two and is present in 11.62 all the way through 1372: Microsoft forums, which were corrected in a couple different areas with browser.js last year, no longer let you submit a message. Nothing happens when you try.


Confirmed. Really bad - need to use IE 8 to post replies.

Hallvord R. M. Steenhallvors Friday, April 20, 2012 7:32:56 PM

Originally posted by rseiler:

Microsoft forums, which were corrected in a couple different areas with browser.js last year, no longer let you submit a message



Hey, good catch. I have a site patch ready, details will be in next blog post :-)

Ola P. Kleivenolak Monday, April 23, 2012 11:22:14 AM

Should be better now.

Steve Fosterq1rwp Tuesday, May 8, 2012 1:27:51 PM

I updated to v11.62 (b1347) recently, and one of the live sites I use is now broken. I discovered they are using the Dojo TK, and that I have the latest browser.js with patch-616 in it, but the site still produces the "WRONG_THIS_ERR" and undefined dojo variable errors.

Public links to site:
https://www.ebu.co.uk/ngs/
https://www.ebu.co.uk/members/

I've had to resort to using another browser (IE9) to login to the latter portion of their site.

Hallvord R. M. Steenhallvors Thursday, May 10, 2012 12:06:09 PM

Originally posted by q1rwp:

I have the latest browser.js with patch-616 in it, but the site still produces the "WRONG_THIS_ERR" and undefined dojo variable errors.



Right.. it's because browser.js can't tell that it's Dojo version 1.7.x. I wanted to limit this patch because we haven't tested it a lot..

I guess we could rewrite the patch a little bit to do a script search/replace, which should actually be safer in terms of not breaking Dojo versions we haven't tested. (This may sound a bit weird, but it takes only a very minor rewrite to avoid this bug..)

Or.. you could simply upgrade to 11.64 - see this changelog: http://www.opera.com/docs/changelogs/windows/1164/ smile

Write a comment

New comments have been disabled for this post.