What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

I'm seeing this happen quite a lot recently across three entirely different internet connections:

alt text

The url is:

http://stackoverflow.com/users/stats/questions?page=2&pagesize=10&userid=419&sort=newest

It happens on IE8, FireFox 3.6 and Chrome 8 on Windows 7 x64, Windows 2003 x32 and Windows 2008R2.

All I'm doing is clicking the pagination buttons ([1][3][3][4][5]...[12] next) for both my questions and provided answers.

Having done a view source, the page is missing the header and body tags. It's like I'm only being served the results list and nothing else.

Update:

Ok, digging through my browser history, I somehow end up on a page with a url like this:

http://stackoverflow.com/users/419/kev#qpage_1-apage_2-qsort_newest-asort_newest

Then, clicking on the navigation links takes me to the incomplete pages.

You're welcome to close because I guess this is more or less a repro/dupe of:

Links on user page are assembled to the wrong destination

share|improve this question
3  
Isn't that the route used by the profile page JavaScript to load new content in through ajax? You shouldn't end up there unless the JavaScript is broken somehow. Also, see: meta.gaming.stackexchange.com/questions/1434/… and meta.stackexchange.com/questions/70335/… –  Yi Jiang Jan 6 '11 at 18:02
    
@YiJiang - that looks familiar although I don't have Javascript disabled or any of those no-script type plugins. –  Kev Jan 6 '11 at 18:13
    
The problem comes because the browser thinks that the variables used to specify the page size in the AJAX URL are undefined when it goes to load your previous state from that URL hash. I'm having one hell of a time figuring out why that is, though, since they seem to be there.. –  Tim Stone Jan 6 '11 at 19:21
    
Discussion with repro steps: chat.meta.stackoverflow.com/transcript/message/435541#435541 –  Marc Gravell Jan 6 '11 at 21:33
    
@marc - oh cool @tim - thanks for persisting with this. –  Kev Jan 6 '11 at 22:25
add comment

2 Answers

up vote 8 down vote accepted

Edit: I misidentified the problem originally, as it actually appears to be a result of the activity page updates. Simple steps to reproduce it are as follows:

  • Visit Kev's profile
  • Click the page "2" link under his list of answers
  • Visit one of the answers that appears
  • Press the browser's Back button to return to the profile
  • A JavaScript exception is thrown, "activityPageSize is not defined"
  • Clicking any of the links will no longer trigger their click handlers, so you get passed through to the API page instead

This happens because when the page loads, the history plugin is initialized with a function that parses the hash out of the URL into an object, and then performs the following check:

if (a.update({ apage: b.apage, afilter: b.afilter })) {
    loadActivity(b.apage, b.afilter, true)
}

The update function returns true in cases where the object you pass it has parameters whose values have changed. In this case, it's checking for apage in the context of activity, but in reality the apage pulled from the URL hash corresponds to the current page of answers. The code doesn't know that, returns true, and calls loadActivity(), which relies on the undefined variable activityPageSize.

To fix this, the apage parameter for the activity tab should be called something else. Additionally, it seems that the code that checks to call loadAnswers() on page load has gone missing, so I think there should be a similar code block for that as well.

share|improve this answer
2  
This is 100% correct. I wish I had read this before debugging it myself :) It's called anpage now, and the loadAnswers call has been added. –  balpha Jan 10 '11 at 20:35
add comment

I actually noticed the same thing happening recently, but under a very specific set of circumstances in FireFox. Here are the steps I had been taking which caused it to happen:

  • Click on my user profile
  • Click on one of my answers
  • Right click the edit link of the question for that answer to edit it in a new tab
  • Edit the question
  • Close the tab where I did the editing
  • Click the back button on the tab with the original question displayed to get back to my profile

I did this about 3 or 4 times in a row, and every time the display of my profile looked like your sample image. I had to navigate to another page then back to my profile (not using the back button) to get it to right itself.

share|improve this answer
    
Yeah...I'm trying to remember the steps I took so I can repro. I don't remember doing anything "clever". Will pay attention more I think so I can record this. –  Kev Jan 6 '11 at 18:13
add comment

You must log in to answer this question.

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