This error appears on node save as reported here #622516: Node Count not updating on comment #13 (http://drupal.org/node/622516#comment-2286728).
This error appears on node save as reported here #622516: Node Count not updating on comment #13 (http://drupal.org/node/622516#comment-2286728).
Comments
Comment #1
fred0 commentedThanks for the differentiation. I'd posted the node save error in #13 on the other thread because it seemed to be related to comment #5 there.
Comment #2
indytechcook commentedIt's no problem. With the size and activities of this issues queue I do my best to keep it straight.
Please give me the steps to reproduce this error. It does not occur for me when I save a node. Make sure you are testing based upon the dev version.
Comment #3
fred0 commentedOk, I seemed to have narrowed this down to a conflict with the CCk module Content Taxonomy.
If my content type has a Content Taxonomy field set and Taxonomy Menu module is enabled, I get the error.
This happens even if the taxonomy in question isn't set to use Taxonomy Menu, just having the core module enabled is enough.
The error is a fairly new thing. The last dev of Content Taxonomy was in Sept and I'd been using that version with Taxonomy Menu for a while without error. Not to say that the problem is fully Taxonomy Menu but, of the two, it is the one that changed more recently.
Comment #4
indytechcook commentedThanks, that's what I needed. I found the bug and fixed it. http://drupal.org/cvs?commit=293340 Please test with the dev created after this post.
Comment #5
indytechcook commentedUpdated Title
Comment #6
hass commentedI'm not using content taxonomy... :-(
Comment #7
hass commentedThis bug seems not fixed if fixed specific for Content Taxonomy only. What is _taxonomy_menu_get_node_terms() for? The function is not required at all as the term id's of a node are already inside
$node->taxonomy = array(). The function is also not used elsewhere. KISS..._taxonomy_menu_nodeadpi_helper() looks like a typo ("nodeadpi") or intentionally wrong written for not colliding with the nodeapi hook? It may be better to rename the function.
Here is the list of modules I have enabled:
admin_menu
advanced_help
cck
devel
lightbox2
link
nodewords
page_title (not configured yet)
pathauto
site_map
tagadelic
taxonomy_breadcrumb
taxonomy_menu
taxonomy_title
term_fields
token
vertical_tabs
views
wysiwyg
xmlsitemap 2.x
I can only guess now - but it could be related to multiple terms per node... need to investigate if this is possible. I know from debugging that my $node->taxonomy array only contains something like array(0 => 123, 1 => 234, 2 => 345).
This is the way how I fill the node's taxonomy programmatically (the taxonomy can be a nested tree) and $tid is always the deepest nested tid:
Comment #8
indytechcook commentedHello hass,
Did you read the comment above the function call?
In both the presave and update case the node->taxonomy array will not necessarily have the correct information needed to update all of the correct menu items. That part of code is the result of alot of time and testing to make it work the best to all situations. Using the taxonomy function ran into issue where the variables were statically cached with old values before table updates and I needed the changes.
It's also important to note the the node->taxonomy array is different in different situations. It's different for free taging, It's also different between the update and add node scenarios.
This really doesn't have ANY effect on how the code operates, but I agree that is does look nicer to have it spelled right :)
If you are not using content_taxonomy and you error message does not match what fred0 has then it sounds like a different issue. Please log a new issue if the message does not match below and let me know the exact setup in taxonomy menu and steps to reproduce.
user warning: 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 'key,3)' at line 1 query: SELECT vid FROM term_data WHERE tid in (key,3) in /var/www/vhosts/hughjaas.com/subdomains/btp/httpdocs/sites/default/modules/taxonomy_menu/taxonomy_menu.database.inc on line 162.Comment #9
fred0 commentedJust reporting in that the latest dev fixes my error. Thanks!