18

The last couple days I've been largely unable to delete comments and perform some other actions on Music. Occasionally it works after a fresh page load but it seems to be completely at random.

Actions that don't work:

  • Deleting comments
  • Editing comments
  • Upvoting comments
  • Flagging comments
  • Removing tags by clicking the x when editing
  • Adding tags by clicking on a suggestion when editing

Actions that work fine:

  • Voting
  • Posting
  • Commenting
  • Flagging posts
  • Editing posts
  • Voting to close

I'd guess that the things that don't work are related somehow, relying on some sort of AJAX mechanism that's broken? Obviously I have no idea what's going on behind the scenes.

This happens in both Chrome 19 and IE8 on Windows 7 x64. The Android site doesn't seem to be affected right now, but I have encountered this problem previously both on Android and Music (it resolved itself after a few days) so I thought I should bring this to MSO.

I have diffed the page source between a page when it was working and when it was not, and found no differences other than timestamps. As such I'd assume this is related to an asset like a script, or perhaps something server-side. (Based on jadarnel27's answer I think that is misleading, I don't trust Chrome to have properly showed the source of the actual page it was showing to me.)

I can consistently "fix" it (very temporarily) by performing two hard refreshes (Ctrl+F5) in Chrome. Yes, always two. It's very weird, and separately confirmed.

12
  • 3
    Well, you aren't going to be able to perform anything on music.stackcahange.com
    – casperOne
    May 10, 2012 at 17:49
  • Gahh.. I was looking right at it and still didn't see it :P
    – Lix
    May 10, 2012 at 17:50
  • I have seen similar behavior when IE8 switches into compatibility mode. See meta.stackexchange.com/questions/114602
    – user102937
    May 10, 2012 at 18:23
  • @RobertHarvey Hmm, unlikely to be the same thing. I only used IE8 to see if this would repro, and I can press Enter to leave comments just fine.
    – user154510
    May 10, 2012 at 20:14
  • Not everyone has that particular problem. SE is having trouble reproducing it.
    – user102937
    May 10, 2012 at 20:14
  • 1
    @RobertHarvey Gotcha. Just did a hard refresh in Chrome and for the moment I'm not having any problems, so I can certainly believe it's hard to repro :P
    – user154510
    May 10, 2012 at 20:40
  • I had the same bug (though under IE10 beta) and reported it here. Matthew's 'clear browser cache' fix worked for me.
    – dumbledad
    May 18, 2012 at 7:02
  • @casperOne What are you talking about stackcahange.com is very popular.
    – bobobobo
    Jun 6, 2012 at 1:26
  • 3
    I have actually had the exact same problem many times, and the fix you outlined worked for me. I also don't see any errors in the console when this is going on (which seems odd). It seems like some of the click events just aren't getting wired up on page load or something. Jun 12, 2012 at 16:45
  • I often have the same problem on WinXP+IE8. I've been using the 'compatibility view' button to resolve it. Jun 26, 2012 at 9:13
  • 3
    I have the same problem on music.SE only. Same thing in Firefox and Chrome. No problem on electronics.SE, DSP.SE, superuser, stackoverflow, etc. There's something about that specific site that's causing problems, and refreshing and clearing cache doesn't fix it (except it will work occasionally if I clear cache repeatedly).
    – endolith
    Jul 23, 2012 at 20:32
  • 1
    I wonder if it has something to do with JTab, if it's Music: Practice & Theory only having the problem. Jul 23, 2012 at 23:44

2 Answers 2

4

jadarnel27 is correct, it was indeed an issue with jTab.

jTab includes a support library called Low Pro for jQuery. Only one of that library's features is actually used, but the other ones are still there. Unfortunately, at least one of those features overwrote a native jQuery method: delegate. That method was added in jQuery 1.4.2, but Low Pro JQ hasn't seen any large activity in four years.

While the "real" and the lowpro delegate do more or less the same thing, they're not identical. But because the lowpro delegate had injected itself deep into jQuery's guts, it was called at some point during the comment click handler creation, and it mangled the function arguments around. I have removed all but the actually used features of lowpro from the jTab file, so this is fixed in the next build.

As for the reason why one refresh usually made it work and two refreshes pretty much always made it work: Chrome actually re-downloads the files on the second refresh. On the first one, it's happy with a 304 Not modified response and uses the cached version. On a "normal" page load, it doesn't even talk to the server – it just uses the cached version, period.

In other words, the harder you refresh, the longer it takes for Chrome to have the jTab file available, and thus the bigger the chance that the click event handlers had already been bound by the time jTab finally arrives and overwrites delegate.

This obviously wouldn't have affected android.se, so whatever happened there was unrelated. Can I assume you haven't been seeing that anymore?

1
  • 1
    Yeah, it was a very long time ago on Android. Thank you!
    – user154510
    Jul 31, 2012 at 23:18
9
+125

(Sorry for abusing the answer box here, but I thought this might be helpful in tracking down where the problem lies. I'm using comment votes as an example, it should apply to all the other elements Matthew Read mentioned)

When I load a Music.SE question for the first time (and comment voting is not working), I can look in Chrome dev tools and see this "click" event attached to the "Comment upvote" button (really an <a> element):

Not working click event listing

After doing two hard refreshes (restoring the comment vote functionality), I see two click events attached to that same <a> element:

Working click event listing

On Stack Overflow (where comment votes always work), it looks like the second example every time a page loads (it never looks like that first example).

0

You must log in to answer this question.