For the following URL, JavaScript breaks:


This is a link to a deleted comment on a deleted answer, the answer I can see as a 10K+ user (although users <10k see the error too).

With Chrome (26, Mac OS X) the console sez:

Uncaught TypeError: Cannot call method 'replace' of undefined

for line 83 of full.js.

Firefox (20, Mac still), the web console spits out:

[12:48:28.459] TypeError: c.attr(...) is undefined @ http://cdn.sstatic.net/js/full.js?v=c9131e40e3fb:83

Safari (6.0.4 on, you guessed it, Mac OS X) has this to complain about:

TypeError: 'undefined' is not an object (evaluating 'c.attr("id").replace')

for line 83 of full.js.

Because of this, the Answer text box on Stack Overflow is lacking all niceties such as an actual WMD editor.

If you remove the hash reference #comment23433042_16356421 from the end of the URL, things work again. Removing the ?noredirect=1 query parameter makes no difference.

  • Weird, I can't reproduce it on the example you linked (which is good, because it means it's probably fixed and just propagating caches). – Tim Post May 3 '13 at 10:57
  • Cannot reproduce on Firefox 20 on my Mac, not even on that page. – BoltClock's a Unicorn May 3 '13 at 10:57
  • @TimPost: As I investigate further, it seems to be limited to just one page. Since I don't have extensions installed in Safari, I am at least confident that it is not a local-to-my-browser-setup problem. – Martijn Pieters May 3 '13 at 10:58
  • Interesting, it's the comment link.. – Martijn Pieters May 3 '13 at 10:59
  • @TimPost: Narrowed it down to the comment hash ref. – Martijn Pieters May 3 '13 at 11:02
  • @BoltClock'saUnicorn: narrowed it down somewhat. Can you reproduce it with the comment reference? – Martijn Pieters May 3 '13 at 11:03
  • Yes, now I can. – BoltClock's a Unicorn May 3 '13 at 11:05
  • self.find(...)[0] could to be related to Greasemonkey or its (SE related) scripts. When I disable it, only c.attr(...) is undefined occurs. I'm unable to see deleted posts though. – Daniel Beck May 3 '13 at 11:08
  • @DanielBeck: Yes, with GM disabled only that line remains, so removed the other entry. – Martijn Pieters May 3 '13 at 11:16
  • @DanielBeck: So you can reproduce it without seeing deleted posts? Interesting. – Martijn Pieters May 3 '13 at 11:29

You must log in to answer this question.

Browse other questions tagged .