set_relation_n_n and flexigrid sorting
- Single Page
Posted 14 May 2012 - 12:48 PM
A quick query - sorry if it's been asked already but I couldn't find if it had by searching the forum..
With fields which have a many to many relationship, when displayed using the flexigrid is it possible to get these to be sortable?
Many thanks,
John
Posted 14 May 2012 - 13:55 PM
If you click a column in the flexigrid to order it by that column which is using set_relation_n_n, the POST request ajax_list includes order_by and then that column name.
However as that column isn't one which exists in the table as the data is coming from the linking table and the linked table and as a result a 500 error is returned with an error from MySQL saying that column doesn't exist.
Unfortunately this then breaks the flexigrid even if you refresh the page because it continues to try and order by that column - so if you try and perform a search, or pick a different number of records to view etc. you continue to get a 500 error for each ajax request. To the end user it just looks like none of the filtering works at this point.
Posted 14 May 2012 - 14:07 PM
However I am seeing a new bug in this version. Searching is not working because I get a 500 error from ajax_list_info as it is trying to do a where search on the column name used for the set_relation_n_n
Posted 15 May 2012 - 07:15 AM
Posted 15 May 2012 - 13:40 PM
I'll watch github to see when you fix that.