The add comment, flag, delete and other such links will open a popup (eg: Mod link) are broken. Clicking on them does nothing.

Javascript error console says:

Uncaught TypeError: Cannot read property '0' of undefined http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js:16

  • I'm getting this, but not consistently. Refreshing the page sometimes works as does navigating away and reselecting the link to the page.
    – ChrisF Mod
    Commented Apr 4, 2011 at 13:44
  • 2
    I only get the problem if I access a page via a link pointing to an answer, and not otherwise. Commented Apr 4, 2011 at 13:56
  • Happened to me a minute ago, now working fine. Commented Apr 4, 2011 at 13:57
  • Oh, I thought Its only happened to me, and notice only on few questions and found out clicking on "active" "oldest" "votes" tabs could recover from that error. I thought my chrome dev 12 browser issue.
    – YOU
    Commented Apr 4, 2011 at 14:00

2 Answers 2


This is fixed now.

It took a whole lot of single-stepping through callback after callback after callback, but in the end, it was actually a bug in the HTML code.

When you link directly to an answer (instead of just a question), this answer is shown in a highlight color which then fades back to normal (as everybody has probably seen).

We're in the process of converting our pages from the old ASPX view engine to Razor, and in the process of converting the partial view that shows a single answer (this conversion happened today), there was a little too much encoding happening, so the result for the highlighted answer looked like this:

<div id="answer-85877" class="answer" style=&quot;background-color:#F6F5EE;&quot;>

This is obviously anything but valid (but it actually depends on the browser how it gets handled). When the jQuery color animation plugin tried to find the current color, all it found was either garbage or nothing (depending on the browser). When it found nothing, this worked fine (except that you didn't see the animation); when it found garbage, this caused the code to throw up.


I think SO should upgrade to jQuery 1.5.2 according to error msg related to "resolveWith"

enter image description here

on jQuery 1.5.2 (around line 1062) (fixed following)

// Strange bug in FF4:
// Values changed onto the arguments object sometimes end up as undefined values
// outside the $.when method. Cloning the object into a fresh array solves the issue
deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );

Edit: Its only happened on answer links, not questions.

If I commented out following line, looks like error gone.

$('#answer-XXXX').animate({ backgroundColor:'#FFF' }, 2000, 'linear', function() { $(this).css('background-color', ''); });
  • this error has nothing to do with resolveWith
    – balpha StaffMod
    Commented Apr 4, 2011 at 15:08
  • aww, ok, but google chrome did give me that error d.extend._Deferred.f.resolveWith on console.
    – YOU
    Commented Apr 4, 2011 at 15:10
  • 1
    @YOU: I'll write up what happened :)
    – balpha StaffMod
    Commented Apr 4, 2011 at 15:11
  • @balpha, but it is related to $.when?
    – YOU
    Commented Apr 4, 2011 at 15:19
  • @YOU: No -- it wasn't even a real JavaScript error.
    – balpha StaffMod
    Commented Apr 4, 2011 at 15:26
  • @balpha, ok, I was just diffing codes, and noticed $.when is gone i.imgur.com/05kNW.png :-) May be just an unrelated case.
    – YOU
    Commented Apr 4, 2011 at 15:32
  • @YOU: Yeah, that's unrelated. I just removed the $.when because it was a no-op (since it received only one deferred).
    – balpha StaffMod
    Commented Apr 4, 2011 at 15:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .