Visiting any recurring info page, for example admin/store/orders/251/recurring gets this:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY o.order_id DESC LIMIT 0, 30' at line 5 query: SELECT o.order_id, o.uid, o.billing_first_name, o.billing_last_name, o.order_total, o.order_status, o.created, os.title FROM uc_orders o LEFT JOIN uc_order_statuses os ON o.order_status = os.order_status_id LEFT JOIN uc_recurring_orders ro ON ro.renewal_order_id=o.order_id WHERE ro.original_order_id = 63 ORDER BY o.order_id DESC ORDER BY o.order_id DESC LIMIT 0, 30 in sites/all/modules/contrib/ubercart/uc_order/uc_order.admin.inc on line 485.
This was true in 6.x-2.x-beta2 and is true in current dev.
Note that the ORDER BY is apparently being rewritten twice:
ORDER BY o.order_id DESC ORDER BY o.order_id DESC
Comment | File | Size | Author |
---|---|---|---|
#1 | 2446145-1.patch | 1.48 KB | TR |
Comments
Comment #1
TR CreditAttribution: TR commentedThis appears to be a problem that should be fixed in uc_recurring. In uc_recurring_order_information(), tablesort_sql($header) is appended to the $sql sent to uc_order_admin(). But this isn't needed, and in fact $header isn't needed here either. Can you try this patch (rolled against HEAD of 6.x-2.x of uc_recurring).
Comment #2
rfayAMAZING TR is still on the job! Thanks!
I already knew this was uc_recurring by the time I got done writing the issue, but forgot to change it :-) Thanks for the patch. It seems simple and appropriate enough, and the results are good: All the behavior remains appropriate, and the error message goes away.
Thanks! RTBC.