Last modified: 2014-10-17 11:43:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63097, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61097 - Flow: JS load of topic with garbled post breaks board interactivity
Flow: JS load of topic with garbled post breaks board interactivity
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
https://en.wikipedia.org/wiki/Wikiped...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-08 22:00 UTC by Quiddity
Modified: 2014-10-17 11:43 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Quiddity 2014-02-08 22:00:23 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")
Comment 2 spage 2014-02-09 10:17:25 UTC
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.
Comment 3 spage 2014-02-13 06:10:23 UTC
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.
Comment 4 Bawolff (Brian Wolff) 2014-02-19 12:40:30 UTC
>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 :)
Comment 5 Gerrit Notification Bot 2014-02-19 19:05:57 UTC
Change 114187 had a related patch set uploaded by Bsitu:
Ignore non-flow javascript error

https://gerrit.wikimedia.org/r/114187
Comment 6 Gerrit Notification Bot 2014-02-19 19:25:22 UTC
Change 114187 merged by jenkins-bot:
Ignore non-flow javascript error

https://gerrit.wikimedia.org/r/114187
Comment 7 spage 2014-08-20 02:15:36 UTC
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.
Comment 8 Gerrit Notification Bot 2014-08-21 00:12:47 UTC
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
Comment 9 Gerrit Notification Bot 2014-08-21 16:00:13 UTC
Change 155474 merged by jenkins-bot:
JS load of topic with garbled post breaks board interactivity

https://gerrit.wikimedia.org/r/155474
Comment 10 Andre Klapper 2014-10-17 11:43:28 UTC
(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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links