Active
Project:
Category
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Feb 2007 at 01:51 UTC
Updated:
5 Sep 2009 at 20:32 UTC
Jump to comment: Most recent file
Hi
I'm using the Category module for a site and i would like to display tag clouds throughout the site.
I recently discovered that Tagadelic isn't compatible with Category.
(see here http://drupal.org/node/116540)
I'm going to post this to the issue trackers for both products as i don't know where the issue lies.
Is there any way we can get the two to work together? The category module aims to keep working with modules that need Taxonomy - but this one doesn't work.
Anyone have any pointers or willing to look into this?
Thanks
Ben
(see http://drupal.org/node/119937 for the issue on Tagadelic's tracker)
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | term_path.patch | 1.07 KB | bdragon |
Comments
Comment #1
bdragon commentedIn the taxonomy wrapper, add a bit to taxonomy_term_path.
I have only tested this on a site with no legacy vocabularies, I don't know what happens if you attempt to use tagadelic on legacy vocabs.
YMMV, but it works for me. After I have fully analyzed this, I will commit a bugfix.
Comment #2
smoothify commentedThanks for this, now at least it doesn't come up with the Page not found any more.
I am having problems with the free tagging though with tagadelic - its not recording the legacy taxonomy info in the database correctly.
If you post an entry with a collection of tags, new ones often get added twice to terms_data, and then get an invalid tid in terms_node
Obviously this makes tagadelic unable to display them in the cloud.
I presume this is problems with the wrapper. ( i did apply your fix)
Thanks
Ben
Comment #3
smoothify commentedi've been looking at this today and think i found the problem with the free tagging.
Its in the taxonomy_save_term function, around line 337.
I added the following lines above the Insert routine:
Before the $edit['tid'] wasn't being set at all resulting in insert errors, or incorrect id's.
Sorry i don't have time for a patch, but this is now working for me.
Comment #4
robby1066 commentedI was just digging around in the tax wrapper and tagadelic modules to see if I could come up with a quick hack to make tag clouds work, and I realized that in the taxonomy wrapper, the function 'taxonomy_get_vocabulary' returns an array, whereas the original 'taxonomy_get_vocabulary' returns an object (at least in 4.7). That appears to be at least one part of the breakage on tag clouds.
that seems like that might be a high-impact change, so I haven't persued it much further, but maybe that helps someone else.
Comment #5
tkgafs commentedI have tried applying the two fixes in this mentioned in this issue
but now when I create a blog posting and add free categories to it I get errors similar to the following
* user warning: Duplicate entry '1-29' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (29, 1) in /srv/www/htdocs/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '1-29' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (29, 1) in /srv/www/htdocs/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '1-29' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (29, 1) in /srv/www/htdocs/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '1-29' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (29, 1) in /srv/www/htdocs/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '1-29' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (29, 1) in /srv/www/htdocs/includes/database.mysql.inc on line 172.
there seems to be one error for each tag minus one [ie if there are 6 tags there are five errors]
I have tried using both the current dev and the head version of category both versions do the same thing
Tkgafs
Comment #6
sjh-1 commentedThis issues looks to me like the one I've been looking at in http://drupal.org/node/87669#comment-225000 There the taxonomy field is populated from the category field by a direct copy, but in doing so doesn't get the tid member. Consequently, all the tid values in term_node also get value 1.
Comment #7
bdragon commentedAgree with your diagnosis.
Testing this specific issue now.
Comment #8
bdragon commentedOK, in addition to the previous patch, there is a bug in taxonomy_term_path.
This patch should take care of that.
Comment #9
bdragon commentedThe path issue goes deeper than that, actually..
Modules are given a chance to override their term's path by implementing the term_path hook. Category has the same hook for categories, only it's category_path.
I think I'm going to invoke category_path and then term_path if category_path fails...
Comment #10
bdragon commentedApplied something similar to HEAD, DRUPAL-4-7, and DRUPAL-5 as part of a fix I committed a few minutes ago.
Things should be working better now, please re-test with a fresh wrapper.
Comment #11
mlncn commentedbdragon, by "Applied something similar to HEAD, DRUPAL-4-7, and DRUPAL-5 as part of a fix I committed a few minutes ago" do you mean your application of http://drupal.org/node/87669#comment-225000 or is there something more?
Dealing with this issue where all tags in the tag cloud point to node!
~ ben, Agaric Design Collective
Comment #12
mlncn commentedUpdate? I reopened http://drupal.org/node/119937 but I realize I should have stayed over here.
Comment #13
mlncn commentedSo one thing Category is doing wrong is returning an array structure in its replacement for the function taxonomy_get_vocabulary (taxonomy.module.COPYME). It should instead return an object.
Which is exactly what robby1066 said two months ago, I just realize!
I will try to find or file the proper issue to go with this, as we are operating from the latest dev release of the Category module.
- ben :: http://AgaricDesign.com
Comment #14
mlncn commentedWe weren't using the latest Category dev (the April 8 one), apparently. The Agaric Design Collective has been broken up. Would anyone like a used collective member?
Tags in current post still isn't working, but everything else is.
Comment #15
bdragon commented"Huh?"
I think part of the "node/" problem is taxonomy_term_path. It isn't actually coping with being passed *terms*.
I swear I have a patch lying around somewhere...
Comment #16
dacc commentedFor awhile our Drupal 5x Tagadelic module was working perfectly. However, my client brought to my attention yesterday the following errors when she tried to add the term "anthropology" using free tagging.
* user warning: Duplicate entry '60' for key 1 query: INSERT INTO term_data (tid, name, description, vid, weight) VALUES (60, 'anthropology', '', 4, 0) in /usr/www/users/holdford/bas/prod/includes/database.mysql.inc on line 174.
* user warning: Duplicate entry '60' for key 1 query: INSERT INTO xmlsitemap_term (tid, pid, last_changed, priority_override) VALUES (60, NULL, 1241713385, NULL) in /usr/www/users/holdford/bas/prod/includes/database.mysql.inc on line 174.
Instead of adding the word "anthropology" to the node tags, Drupal adds the word "bear," which I believe is a random word from the list. (It's different every time.)
We have followed the suggested fixes described in this thread so far to no avail.
There does not seem to be a problem with our Category module, but this thread is the closest I could find to the error I was receiving.
Any help would be much appreciated.
Des
Comment #17
JirkaRybka commentedClosing duplicates:
#75025: Category module doesn't work with tagadelic (with a bit of old discussion)
#137212: Can anybody help me? (hardly even related)
Some bugs encountered in above discussion have own issues:
#338846: Taxonomy Wrapper 1.26.2.2: taxonomy_get_vocabulary as object instead of array? (array vs. object)
#87669: [MASTER] term_node tid getting set to "1" (tid=1)
We need to examine the rest here, and most probably move this to 6.x queue, but I don't use Tagadelic myself (this my post is just clean-up).