Regression: Cannot sort topic list


(Kane York) #1
Uncaught TypeError: Object function () {
    var url = Discourse.getURL("/") + filter + ".json";

    if (params) {
      var keys = Object.keys(params),
          encoded = [];

      keys.forEach(function(p) {
        var value = params[p];
        if (typeof value !== 'undefined') {
          encoded.push(p + "=" + value);
        }
      });

      if (encoded.length > 0) {
        url += "?" + encoded.join('&');
      }
    }
    return Discourse.ajax(url);
  }
has no method 'then' 

calltrace:

(anonymous function) 	topic_list.js?body=1:74
sendEvent 	ember.js?body=1:2300
ObserverSet.flush 	ember.js?body=1:2441
endPropertyChanges 	ember.js?body=1:2636
Ember.tryFinally 	ember.js?body=1:1362
Ember.changeProperties 	ember.js?body=1:2659
Ember.setProperties 	ember.js?body=1:3571
Ember.Observable.Ember.Mixin.create.setProperties 	ember.js?body=1:10264
Discourse.SortOrder.Ember.Object.extend.toggle 	sort_order.js?body=1:29
Discourse.SortableHeadingComponent.Ember.Component.extend.click 	sortable_heading_component.js?body=1:37
Ember.CoreView.Ember.Object.extend.trigger 	ember.js?body=1:19831
superWrapper 	ember.js?body=1:1178
Ember.merge.handleEvent 	ember.js?body=1:22411
Ember.View.Ember.CoreView.extend.handleEvent 	ember.js?body=1:21885
(anonymous function) 	ember.js?body=1:19570
Backburner.run 	ember.js?body=1:5688
Ember.run 	ember.js?body=1:6054
Ember.EventDispatcher.Ember.Object.extend._bubbleEvent 	ember.js?body=1:19569
(anonymous function) 	ember.js?body=1:19513
Ember.handleErrors 	ember.js?body=1:850
(anonymous function) 	ember.js?body=1:19504
jQuery.event.dispatch 	jquery-2.0.3.js?body=1:4677
elemData.handle

bisect result:

[vagrant@precise32:/vagrant ((no branch))]$ git bisect bad
3a6bffa05db4cbc7dd6106473cecf82e87f14085 is the first bad commit
commit 3a6bffa05db4cbc7dd6106473cecf82e87f14085
Author: Régis Hanol <regis@hanol.fr>
Date:   Tue Jan 14 01:02:14 2014 +0100

    FEATURE: better top pages

:040000 040000 f3b4627a3e17a945f3872b6db8ae5bca3d18e4a6 736dcc4e784e621d420369c8f74e26012906430a M	app
:040000 040000 d45a550d8ff4a30717c43ba4826e3d9480240b32 8fc524f23baca8245f3490398e728c3915400411 M	config
:040000 040000 2aadf0affaa1be78440d7bfa888dca43302cef0b 15ca5d0976b92477b77878cdf02a45720945cbbc M	db
:040000 040000 0048648bd43d6a5c37d22542bde45263ae583fe4 97f503513094171601bd48b690d21262a708569c M	lib
:040000 040000 7ddb1e07e8ccb93811f751314d747a9ae1e3afa1 4f26ae280f49bd27a46bbe869d5dd8832abea393 M	test

(Kane York) #2

@zogstrip this is yours

I’m not going to bother trying to find it in the diff, it’s pretty big.


(Régis Hanol) #3

@riking Thanks! This is now fixed and deployed

https://github.com/discourse/discourse/commit/2a89f51d19e7f69b4a15ccc54a1dc91ece2db456


(Robin Ward) #4

(Régis Hanol) #5

This topic was automatically closed after 12 hours. New replies are no longer allowed.