Skip to content
Browse files

BUGFIX Use tree/xxx instead of tree?ID=xxx when fetching subtrees for…

… TreeDropdownField. Fix #7730
  • Loading branch information...
1 parent c28c024 commit fb9e997b5e22ec8518967c69007632b8e5e90071 @patbolo patbolo committed with wilr
Showing with 5 additions and 3 deletions.
  1. +5 −3 javascript/TreeDropdownField.js
8 javascript/TreeDropdownField.js
@@ -192,10 +192,12 @@
// TODO Hack to avoid ajax load on init, see
'data': this.getPanel().find('.tree-holder').html(),
'ajax': {
- 'url':'urlTree'),
+ 'url': function(node) {
+ return'urlTree') + '/' + ($(node).data("id") ? $(node).data("id") : 0);
+ },
'data': function(node) {
- var id = $(node).data("id") ? $(node).data("id") : 0, params = self.getRequestParams();
- params = $.extend({}, params, {ID: id, ajax: 1});
+ var params = self.getRequestParams();
+ params = $.extend({}, params, {ajax: 1});
return params;

4 comments on commit fb9e997


I have a small issue where this would break the translatable module. The resulting code would try to request a url similar to the below:


I'd issue a pull request if I knew how to submit more than one at once on Github. :)


@tractorcow use branches for each pull request. E.g I have sapphire/fix-1234, sapphire/fix-foobar then you can submit as many pull requests as you want from different branches. Once the branch has been merged, then simply delete it.


Thanks for the advice Will. It has helped me become a better community member. :)


I've added my fix in a80daef. Thank you for your help.

Please sign in to comment.
Something went wrong with that request. Please try again.