Sorting by any topic list column prevents loading more topics

(Jens) #1


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 and clicking on the category header sorts the list by category. Scrolling down does not load additional topics.

  3. Opening 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 @ /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 @ /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 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.

(Jeff Atwood) #2

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

(Sam Saffron) #3

Nope, this used to work

(Robin Ward) #4

Got a fix for it here:

(Robin Ward) #5