When taxonomy_manager is used with taxonomy_menu there is an error when saving a term with a parent.

This is the error (so it can be found by Google or the drupal.org search).

An AJAX HTTP error occurred.HTTP Result Code: 500Debugging information follows.Path: /nl/system/ajaxStatusText: errorResponseText: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ' NULL AND vid = '3'' at line 1: SELECT mlid FROM {taxonomy_menu} WHERE tid = :tid_add, :tid_add_button AND vid = :vid; Array([:vid] => 3[:tid_add] => [:tid_add_button] => )in _taxonomy_menu_get_mlid() (line 39 of C:\local\htdocs\tvh\sites\all\modules\taxonomy_menu\taxonomy_menu.database.inc).

Notice: Array to string conversion in execute() (line 2168 ofC:\local\htdocs\tvh\includes\database\database.inc). =>

At first we thought it was a taxonomy_menu issue, but this what happens.

When taxonomy_manager adds a parent, it is added by an ajax callback. When you click save, the form data is passed to term for saving. Taxonomy menu hooks into the saving of the term. After the ajax callback, everything is fine, but when saving, it receives an array with the text tid_add and tid_add_button instead of a tid.

We fixed it in taxonomy_manager.admin.inc in the function taxonomy_manager_term_data_form_submit by adding this on the first line:

It removes the parents from the form, preventing it will be processed again (it has already been processed by the ajax callback).


We are not sure if this is the best place or way to do this, but we hope this gives enough information to make a patch.