Node Count not updating
Mistercrash - November 3, 2009 - 22:37
| Project: | Taxonomy Menu |
| Version: | 6.x-2.4-beta3 |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | fixed |
Description
I'm having some trouble with taxonomy menu not rebuilding when I create a new node. This results in the "Display number of items" option not updating. I can only rebuild the menu manually. This is not the case with Taxonomy Menu version 2.4 beta1.
Does anybody have an idea how I can have it automaticly rebuild whenever I create a new node that has a taxonomy term from the menu attached? Like it did before...

#1
I tried out 2.3 Stable version and adding nodes does rebuild the menu but deleting nodes doesn't....
#2
Setting to bug and investigating. There was a change done to limit the amount of work done after each node update.
#3
I've confirmed this bug and know where it is. I'm fixing it now.
#4
The change has been committed and will be part of latest dev.
#5
I'm having some issues with the new dev. Runnin it from school right now, but will try this again at home. Might be just me.
It deletes the node, but still doesn't change the node count and trows these 2 errors at me.
recoverable fatal error: Object of class stdClass could not be converted to string in C:\xampp\htdocs\drupal.local\sites\all\modules\taxonomy_menu\taxonomy_menu.database.inc on line 160.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 ')' at line 1 query: SELECT vid FROM term_data WHERE tid in () in C:\xampp\htdocs\drupal.local\sites\all\modules\taxonomy_menu\taxonomy_menu.database.inc on line 161.Greetz Alex.
#6
Hello Alex,
The issue was that the delete operation in nodeapi was sending the node->taxonomy array differently then the other operations. I fixed this issue.
I did a little more testing this time and it looks good. Look for the latest dev and new package soon.
#7
Sorry to keep bothering you with this, but it's not there yet. On the contrary I think you need to take a few steps back because it's going in the wrong direction. The error messages are gone but,
i've got several new issues:
- deleting multiple nodes with the same term causes only one term making a -1 in the (node counter).
- deleting multiple nodes with different terms cause again only one term making a -1 in the (node counter).
- deleting the whole vocabulary causes all node counters to dissapear but the menu still remains in the taxonomy_menu table.
- when creating a new vocabulary for the menu it adds the new menu to the old one.
- welll.....after that it's about all screwed. Adding nodes doesn't add count's, deleting is still the same.
What I'm thinking here is that you are trying too hard with the delete op to make the array correct.
Maybe it's not a bad idea to call the whole rebuild function of the rebuild check box of the interface settings.
Because that one always made the correct changes.
Again I'm just guessing here, im not a php expert (yet:-) so have a hard time figuring out the code.
I just have the feeling it's becoming a worse problem. Hope I'm not stressing you out with this bug.
I will gladly keep testing your changes cause I'm pretty keen on your menu.
#8
I confirm deleting a node then the count remain the same of past, instead adding is ok using the 2.3 stable.
#9
subscribe
#10
Sorry I've been MIA. Uping priority to get me to work on it;
#11
Note about calling the rebuild function: It's can be pretty recourse intensive. Not something you can to run after each node delete. Thanks for the info. I'll keep digging.
#12
Fixed this here: http://drupal.org/cvs?commit=291396 will be in the latest dev within 12 hours.
Still working on the others.
#13
I'm seeing this error twice on node saves:
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.#14
I made a change that should help. I haven't had a chance to test it yet. The dev should be updated within the next 12 hours.
#15
My error persists after Nov 21 dev update.
#16
I also do have this issue with 6.x-2.4-beta3! This is really bad as I've made this upgrade to get rid of rebuilding failures solved in beta2 with #539046: Use Batch API to regenerate menu. Any chance to get this bug fixed soon?
#17
@fred0 & @hass the node save issue is being tracker here: #641068: Error on node save when using Content Taxonomy. In the future, please be sure to open new issues for unrelated items. This issue is for an error on node count.
On a side note. I am unable to reproduce the erorr. Please post the instructions about how to reproduce the issue here: #641068: Error on node save when using Content Taxonomy.
#18
I found where the issue is with multiple nodes. I'm working on it and should have a fix today.
#19
Only as a note - I have the Node Count not updating issue, not the Error on node_save(). Looking forward to test the patch.
#20
lol. So many issue, so little time. Thanks for the info hass. This issue became confused by poor fred0 :)
Here is a patch. Since I haven't tested it AT ALL, i am just including the patch and not committing. Make sure you apply the patch to the latest DEV and not BETA3 if you have time to test, clear caches, rebuild the taxonomy menu, etc ;)
I'll get to testing after work tonight.
Cheers,
Neil
#21
The latest patch did not update the node count and gave me the following error:
user warning: Unknown column 'tags' in 'where clause' query: SELECT vid FROM term_data WHERE tid in (1,tags) in /var/www/thereisamoduleforthat/sites/all/modules/taxonomy_menu/taxonomy_menu.database.inc on line 162.#22
I confirm, als ofor me the problem is only with multiple nodes, here http://www.wyposazeniehoteli.com/ without multiple selection enabled, I have addded the Horeca therm and all is ok, instead on taxonmy with multislection activated it give problems, yes, using the last old stable version not beta 2.3.
#23
Thanks for you patience. I was tyring to implement a new check that doesn't seem to be worth the effort. I backed out some of my changes and and it seems to be working much better. I took @hass's advice of KISS :)
Check against the DEV version in the next 12 hours or against the DRUPAL--6-2 branch. Once I heard the word, I will create a new release.
#24
Could one of you explain a bit what you mean with "multiple" nodes? I'm only executing node_save() nothing else… node by node. (import script)
#25
Sorry for my mistake, with "multiple nodes" (copyed from here: http://drupal.org/node/622516#comment-2301046) I mean:
Multiple select
Allows posts to have more than one term from this vocabulary (always true for tags).
#26
Have you tried the latest dev yet? I made an update last night.
#27
Not yet - limited time... hopefully tonight :-)
#28
Using the latest dev, the node count was successfully updated upon both node creation and deletion. Thanks.
#29
I have tested .dev on a non multiple select and it is ok as first, and then I tested it on a multiple select ( grey nice_menu on the left http://www.forniture-alberghiere.net ) and it is ok! Just it don't appear into alfabetical order, but at least it is showed without need anytime my handwork.
#30
See #641036: Items not correctly orderd by alphabet
#31
Setting to Fixed. :)
@matteoraggi other issue will be tracked #641036: Items not correctly orderd by alphabet