Last modified: 2014-10-17 11:43:28 UTC
At https://en.wikipedia.org/wiki/Wikipedia_talk:Flow/Developer_test_page If I scroll all the way to the bottom, it stops loading just before this topic, which contains some (garbled/breaking) content: https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Flow/Developer_test_page&workflow=050fede1069023bf2b5f90b11c2788f0 Possibly related to the older bug 59939 ("a garbled post must not prevent loading its topic or Board") Possibly related to the current bug 61066 (only an issue at MediaWiki.org) ("Loading new topics broken on MediaWiki.org")
With a browser console open, I get ReferenceError: categoryTreeExpandNode is not defined after the last successful API request https://en.wikipedia.org/w/api.php?action=query&format=json&list=flow&flowpage=Wikipedia+talk%3AFlow%2FDeveloper+test+page&flowworkflow=050fe6c09d00b4f1d8a8842b2b782806&flowparams=%7B%22topic_list%22%3A%7B%22offset-dir%22%3A%22fwd%22%2C%22offset-id%22%3A%22050feedb983d2a1965be90b11c2d7b68%22%2C%22limit%22%3A10%2C%22render%22%3Atrue%7D%7D with debug=1 it's coming from https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=true&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.triggerQueueCallback%2CloadingSpinner%2CmwEmbedUtil%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20140207T032307Z/eval/seq/3 Line 3 But I also get this error on Special:Version, so maybe it's not the root of this problem. There have been recent problems with CategoryTree, see {{bug|59798}}.
The function not defined may be a red herring. The permalink to the post with it is https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Flow/Developer_test_page&topic[postId]=050feeb6ed311f2cb98d782bcb072868&workflow=050fede1069023bf2b5f90b11c2788f0#flow-post-050feeb6ed311f2cb98d782bcb072868 ; load this alone and you get the error. Bug 59798 mentions that extension CategoryTree inserts JS invocations of these missing functions. But I can cause a similar JS error by inserting a call to <categorytree> in a post, e.g. <https://en.wikipedia.org/wiki/Wikipedia_talk:Flow/Developer_test_page?topic[postId]=0510585577ed50dfae2e842b2b77e916&workflow=0510585577ed50dfae2e842b2b77e916> , and when I do it it doesn't stop older topics from loading. So perhaps MZMcBride included code in a different fashion, or it's some other nearby post that's breaking pagination. CategoryTree's ext.categoryTree ResourceLoader module isn't loaded on Flow boards, this could be an issue with other extensions that insert script tags.
The bug in Flow is this: When infinite scroll appends topics into the current Flow board, any JavaScript errors in the HTML of posts that it inserts halt JS execution and so the code to set up pagination of the next 10 topics isn't executed. In more detail, the error occurs in paging.js click() > readTopicList() > done callback > $output.append( topic.rendered), and so the rest of the done() callback doesn't execute. If the problematic post is on the initial page load, the order of execution must be different. One fix is to append the topic.rendered HTML in a try-catch block, and display an 'Error loading topic _<UUID>(link)_: Exception' in its place. Another is to reorder the done callback so that the pagination is added before appending untrusted blocks of HTML, but that might lead to extra unwanted scroll events.
>CategoryTree's ext.categoryTree ResourceLoader module isn't loaded on Flow >boards, this could be an issue with other extensions that insert script tags. categoryTreeExpandNode is not a function in the ext.categoryTree module (Because categorytree is borked), so not loading it won't affect anything :)
Change 114187 had a related patch set uploaded by Bsitu: Ignore non-flow javascript error https://gerrit.wikimedia.org/r/114187
Change 114187 merged by jenkins-bot: Ignore non-flow javascript error https://gerrit.wikimedia.org/r/114187
I think we lost this defensive code described in comment #3 in the Flow front-end rewrite. If you visit https://en.wikipedia.org/wiki/Wikipedia_talk:Flow/Developer_test_page?topiclist_offset-dir=fwd&topiclist_limit=10&topiclist_offset-id=rq0wujqfuhwmya82 , note that "ReferenceError: categoryTreeLoadChildren is not defined" appears in the browser console as you scroll down. Starting at "category tree test" the topic reply form isn't collapsed because Flow's JS didn't enhance the topics. Note this only happens when the Flow JavaScript loads additional topics -- you have to start displaying "before" the set of posts with the bad JS in it. Recreating https://gerrit.wikimedia.org/r/114187 should fix this bug again. The effect of not guarding against JS errors in loaded code has changed. Instead of older topics not loading, you now get endless loading of the same set of pages, see bug 68932.
Change 155474 had a related patch set uploaded by Bsitu: JS load of topic with garbled post breaks board interactivity https://gerrit.wikimedia.org/r/155474
Change 155474 merged by jenkins-bot: JS load of topic with garbled post breaks board interactivity https://gerrit.wikimedia.org/r/155474
(In reply to Gerrit Notification Bot from comment #9) > Change 155474 merged by jenkins-bot: > JS load of topic with garbled post breaks board interactivity > > https://gerrit.wikimedia.org/r/155474 Patch was merged - assuming this bug is FIXED. If that is not the case: Please reopen and elaborate what is left to do here to get this report fixed.