Users reported a bug in Discourse’s review queue where infinite scrolling pagination fails after taking an action (e.g., approving or rejecting an item), particularly when using sorting options like ‘Created at’ or default ‘score’. markersocial confirmed the issue persists in version 2.8.0.beta4, requiring a full page refresh to restore pagination. jomaxro reproduced the issue easily: flag 11+ posts, handle the first, then scroll — no new items load. William_Houston traced the root cause to Ember’s reviewables array being replaced with a plain array after rejection, losing its loadMore() method. A proposed fix — replacing this.set("reviewables", newList); with this.reviewables.set("content", newList); — preserves the class methods. The fix was implemented and merged via PR #16346 by vinothkannans. sam had previously believed the issue was resolved, but it resurfaced, prompting re-testing and confirmation. The issue is now closed with the fix deployed.
I noticed that after handling an item in the review queue e.g. ‘Approve Post’ it becomes not possible to scroll further (load more via infinite scrolling pagination). At least in my case using a ‘Sorted by:’ option of ‘Created at’.
So I tested this again on 2.8.0beta4 and still occurs for me with the default sort order (score). I believe it is the same with any other sorting options from past testing.
To reproduce, just need at least 11 items in the review queue. If you handle any item at the top of the list (approve/reject etc.), afterwards it will not be possible to scroll down and paginate to the last item on the list. The whole list needs to be refreshed in order to be able to paginate again.
Perfect, thanks for the details! @sam, I can reproduce this. Easy repro as suggested by @markersocial - flag at least 11 posts, open the review queue, handle the first flag, then scroll down.
reject returns an array. When the reviewables variable is set to the newList array (line 114), the class with additional methods like loadMore() is replaced with a basic array. (edit: that is why loading works properly before resolving an item but not after)
A possible fix is to replace this.set("reviewables", newList); with this.reviewables.set("content", newList);.