Sorting by any topic list column prevents loading more topics

Hi!

When I tried sorting the topic list by category today, I noticed several things off:

  1. The list is sortable by category at all. I don’t really see the use case.

  2. Opening meta.discourse.org and clicking on the category header sorts the list by category. Scrolling down does not load additional topics.

  3. Opening meta.discourse.org and clicking on “latest”, then on the category header does not sort the list, but generates the javascript error

    Uncaught TypeError: Cannot set property 'order' of undefined
    RestModel.extend.refreshSort @ /discourse/models/topic-list:51
    controllerOpts.actions.changeSort @ /discourse/controllers/discovery/topics:29
    Mixin.create.send @ /production/ember:29423
    Mixin.create.triggerAction @ /production/ember:33333
    View.extend.sendAction @ /production/ember:38991
    (anonymous function) @ /discourse/components/topic-list:53
    on @ /discourse/components/topic-list:43
    __exports__.default.Ember.Component.extend.click @ /discourse/components/topic-list:52
    EmberObject.extend.trigger @ /production/ember:39524
    apply @ /production/ember:19209
    superWrapper @ /production/ember:18780
    merge.handleEvent @ /production/ember:39739
    CoreView.extend.handleEvent @ /production/ember:41827
    Backburner.run @ /production/ember:195
    Backburner.join @ /production/ember:218
    run.join @ /production/ember:17510
    __exports__.default.EmberObject.extend._bubbleEvent @ /production/ember:37392
    (anonymous function) @ /production/ember:37343
    n.event.dispatch @ /production/jquery-2.1.1.min:4
    n.event.add.r.handle @ /production/jquery-2.1.1.min:4
    
  4. Opening meta.discourse.org/?order=category directly, displays the sorted list. Scrolling down loads additional topics as expected. When I click the sort button now, the sort order is correctly reversed, but scrolling down does not load additional topics.

1 Like

This is true @eviltrout sorting by any column disables further loading as you scroll down. Is that intended?

Nope, this used to work

Got a fix for it here:

https://github.com/discourse/discourse/commit/56cd381ff89e431c9d5921cbbc0954d63a8dd35d

5 Likes