Guys, I’m working on a plugin for GD and added a new hierarchical taxonomy, let’s call it gd_place-breeds.
When I try to save a listing (gd_place) that uses that taxonomy, I get an error:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-breeds = ',59,', marker_json = '{"id":"66","lat_pos": "39.89576' at line 2]
UPDATE wp_geodir_gd_place_detail SET gd_place-breeds = ',59,', marker_json = '{"id":"66","lat_pos": "39.895763615428","long_pos": "-75.123472163455","marker_id":"66_59","icon":"","group":"catgroup59"}' where post_id = 66
In your function geodir_set_post_terms(), the code tries to insert/update my gd_place-breeds selection into the wp_geodir_gd_place_detail table which doesn’t have that column. And doesn’t need it. Now obviously I could add the column, but it’s not necessarily appropriate there. The code is forcing any plugin or extension to add more columns to the gd_{type}_detail tables with no way of bypassing that requirement.
I’m also not sure why my custom taxonomy would be linked/updated along with the lat/long of a listing. It’s a little weird.
Any thoughts?