Counting of relations seems to be broken
The counting of relations seems to be broken or at least errornous...
Although we only tagged two items with tag "company" the counter in the main
table increases randomly to (at the moment) 54. As a result the tagcloud sizes the "download" at a very big font size...
using tagpack 0.12.1
#2 Updated by Jo Hasenau over 9 years ago
- Status changed from Accepted to Needs Feedback
Could you please describe more detailed what you mean by "main table" and "randomly" and if it is about the real number of entries in the relations table of the database, the number of relations visible in the backend or the number of "items tagged with blah" in the frontend?
#3 Updated by Florian Schaeffer over 9 years ago
If I create a tag called "download" and than tag some content / some pages, the relation counter in table tx_tagpack_tags should increase by one for every tagged element...
In our case the field relations in table tx_tagpack_tags increases to higher values...
select * from tx_tagpack_tags_relations_mm where uid_local = 34 //(34 is tag "download")shows only 1 relation, the field tablenames is set to pages. So there is only 1 page tagged as download and no content element.
select * from tx_tagpack_tags where uid = 34shows for field relations the value 6 ...
Result: the tagcloud displays the tag download in a bigger fontsize, the result list displays only the one found relation of type pages...
I also tried resetting the relations-field in table tx_tagpack_tags to 0 but again it increases without any further tagging or at least it increases when some other tagging is taking place. So there must be some wrong calculations happening in class.tx_tagpack_tceforms_addtags.php in function delete_update_insert_relations
#4 Updated by Jo Hasenau over 9 years ago
Sorry - but I can't reproduce this behaviour for any table in our testing environment. The number of relations is always updated to the correct value for each of the usual commands and for tt_news as well as pages. It works with hiding/unhiding and deleting/undeleting records as well as with the usual tagging or removal of single tags. I checked the functions you mentioned and they just increase/decrease the value of the field by 1 so a value of 6 could only be generated by calling these functions too many times.
It seems we need more information about your scenario: TYPO3 version, tagpack version, other extensions installed together with the tagpack - maybe even PHP and/or DB version could be the reason?
#5 Updated by Florian Schaeffer over 9 years ago
I just uninstalled the extension and reinstalled the newest version. As the extension just increments or decrements the counter in table tx_tagpack_tags I recalculated the number of relations and updated the table. Now everything is working as expected, at least I cannot reproduce the miscalculation anymore...
So maybe there was a hickup somewhere in our system at the time we first tagged items...
Will report if the problem reoccures, until now the issue could be closed.
Thanks for all your support