The following URL produces an invalid SQL which is visible the next page refresh in the Drupal Admin interface: -
http://www.site.com/services/json?method=%22taxonomy.selectNodes%22&tids=1
The SQL that is produced for the above scenario is 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM node n WHERE n.status = 1 ORDER BY LIMIT 10 OFFSET 0'. Notice the missing order field.
From what I can see, the default $order = 'n.sticky DESC, n.created DESC' in services/services/taxonomy_service/taxonomy_service.inc:taxonomy_service_select_nodes() is being overwritten with the empty order argument.
I have attached a patch that resolves this problem, not sure if it's the best approach.
Ash.
Comment | File | Size | Author |
---|---|---|---|
json_server.module.bugfix-diff.txt | 743 bytes | origin_energy |