19

I just noticed that the navigation bar for changing the question pages is kind of going wrong. This happens only with Stack Overflow. Meta works fine.

navigation bar for changing the question pages example

If I click the 'next' button, nothing happens and I'm just sent back to top, the question list doesn't change. If I click a number, the question list changes but the highlight stays on the first page.

Am I the only one experiencing this ?

Browser: Mozilla Firefox 54.0.1 (32 bits)

From Mozilla Debugger:

enter image description here

7
  • 1
    No repro when you're on the New Navigation. ...
    – rene
    Commented Aug 9, 2017 at 9:30
  • @rene how do you know you're on new navigation ? Commented Aug 9, 2017 at 11:39
  • 15
    Why are you wandering off to the second page? What were you looking for? WHAT WERE YOU THINKING??
    – Timothy
    Commented Aug 9, 2017 at 11:41
  • @MartinVerjans if you're navigation experience is broken by design but not when others report bugs about it, you're on the new nav. You might also find the setting in your profile page and read this for more background.
    – rene
    Commented Aug 9, 2017 at 11:44
  • @rene I feel kinda stupid because I don't find it on my preference page... Commented Aug 9, 2017 at 11:54
  • @MartinVerjans it's the "New question filter" preference if I'm not mistaken. Commented Aug 9, 2017 at 12:00
  • @g00glen00b OK thanks I'm on the new navigation then Commented Aug 9, 2017 at 12:04

2 Answers 2

9

This is fixed.

There were multiple components at play:

  • There's an advertising data structure on the site that surprisingly turns from an array to an object when an async script loads.
  • When new-nav changes pages, it reloads a chunk of the page rather than navigating. This chunk contained code that assumed the data structure was an array.
  • JavaScript errors aren't handled in the HTML that gets appended by jQuery, causing the script to halt.

Putting the three together: You tapped "Next", the HTML loaded, the script in that HTML evaluated and threw an error, and the page stopped updating.

This didn't affect users with new-nav turned off, because all HTML was loaded before the object converted, or users with an ad blocker, because the script didn't load and the object was never converted.

13

Yeah, confirmed on Chrome Latest:

Console error:

VM286:5 Uncaught TypeError: cmds.unshift is not a function
    at eval (eval at <anonymous> (jquery.min.js:2), <anonymous>:5:10)
    at eval (eval at <anonymous> (jquery.min.js:2), <anonymous>:14:3)
    at eval (<anonymous>)
    at jquery.min.js:2
    at Function.globalEval (jquery.min.js:2)
    at Ha (jquery.min.js:3)
    at n.fn.init.append (jquery.min.js:3)
    at n.fn.init.<anonymous> (jquery.min.js:3)
    at Y (jquery.min.js:3)
    at n.fn.init.html (jquery.min.js:3)

Happens on multiple pages, tested homepage, questions page and navigating via tags, and it's not fixed with a hard refresh.

4
  • 5
    also managed to repro, Chrome 60, Win10 64-bit, on new navigation Commented Aug 9, 2017 at 11:33
  • No repro, Chrome 59.0.3071.115, Win10 64-bit, on new navigation
    – Skipper
    Commented Aug 9, 2017 at 12:26
  • 1
    I'm able to reproduce this only if I turn off ad block. Investigating.
    – Brian Nickel Staff
    Commented Aug 9, 2017 at 16:40
  • @BrianNickel yeah, I have ghostery running for ad block, which explains that.
    – Tanner
    Commented Aug 10, 2017 at 8:31

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