Active
Project:
Aggregator2
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
10 May 2006 at 11:27 UTC
Updated:
17 Jul 2006 at 21:28 UTC
Jump to comment: Most recent file
Hi,
Just installed agg2 on a fresh 4.7 install.
Was having problems getting the autotaxonomy mini-module working.
I've created some feeds with rss feeds that I know have category tags (some of the same feeds are also running on a 4.6 site with agg2 and autotaxonomy, and everything is working fine) but nothing seems to get generated for taxonomy terms when i update the feed on the 4.7 install.
Does autotaxonomy work with the cvs version of agg2 on 4.7?
Thanks for any advice or tips
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | aggregator2_autotaxonomy_2.module | 7.63 KB | agentrickard |
| #19 | aggregator2_autotaxonomy_1.module | 7.17 KB | agentrickard |
| #18 | aggregator2_autotaxonomy_0.module | 7.39 KB | agentrickard |
| #17 | aggregator2_autotaxonomy.module | 7.39 KB | agentrickard |
| #15 | aggregator2-item-terms.patch.txt | 3.26 KB | sillygwailo |
Comments
Comment #1
Christoph C. Cemper commentedI'm interested in this one, too... any comments?
Comment #2
colorado commentedHeyho,
I haven't been able to get Agg2 from cvs to work on my fresh 4.7.0 install. What Agg2 version are you using - did you patch it? If so, with what patch(es)? And with what combination of options in the settings?
(Currently the feeds themselves appear to be working properly (giving no error messages), but refreshing the feed always generates "0 new items" (I have the same feed working perfectly on a patched 4.6.5 installation.)
Thanks!
Comment #3
voidberg commentedSame problem happens to me too. The same thing occurs after patching taxonomy module.
Comment #4
Christoph C. Cemper commentedI have mixed results...
I get one feed with 0 results,
then the other one works fine...
took the normal 4.7 dist and the latest agg2 module
however I get A LOT of "duplicate-key" errors for the term_node table when updating
christoph
Comment #5
mlh-1 commentedIn aggregator2_autotaxonomy.module On line 30
Change
if($node->type == 'aggregator2-item' && isset($node->rss_item_data)) {
to
if($node->type == 'aggregator2_item' && isset($node->rss_item_data)) {
That should fix the issue.
Comment #6
buddaChange committed thanks!
Comment #7
sillygwailoI updated to the latest CVS version (which has the aggregator2-item => aggregator2_item fix) and still can't get categories in items' <category> elements to apply correctly to aggregator2 items.
Comment #8
sillygwailoComment #9
buddaAre the category terms getting created correctly in your taxonomy now though?
Comment #10
sillygwailoThe best I can tell is that aggregator2_autotaxonomy.module works correctly (that is, based one some print_r debugging I did, aggregator2_autotaxnomy would identify the categories from the RSS feed and put them into an array), it's just that once aggregator2.module gets a hold of it, it will only apply the category that comes as from the setting in the feed item node, not the tags in the RSS feed.
Comment #11
Christoph C. Cemper commentedagree with Richard
Comment #12
agentrickardI'm trying to track this problem as well. Here's what I have so far.
Using CVS of aggregator2 and aggregator2_autotaxonomy on fresh 4.7.2 install.
In line 76-78 of aggregator2_autotaxonomny.module we have this line:
The intent here is to save a new term (if needed) and use the $term var to set the taxonomy for the node to be saved.
But http://api.drupal.org/api/4.7/function/taxonomy_save_term taxonomy_save_term does not return a $term object. It only returns a $status message. So the $term['tid'] is never set.
I think we have to grab the $term data by name in order for this function to work.
Will explore more.
Comment #13
agentrickardI think I'm near a solution, but may be off base. It looks like the module is having trouble with changes to taxonomy_node_save() in 4.7 -- specifically formatting of the $node->taxonomy variable.
Hopefully this is helpful.
Before I go on, two apologies.
1) I haven't tested this thoroughly. Only for my setup.
a) I am inserting tags into feed items using a 4.7 free-tagging vocabulary.
b) I want to insert both the feed tags and the items category tags for each item
2) I haven't rolled a patch because I haven't learned CVS.
Here's what I changed.
aggregator2.module function aggregator2_parse_items() line 1985
This gives us the taxonomy object in the same format as for saveing feeds.
Aggregator2_autotaxonomy.module function aggregator2_autotaxonomy_nodeapi(), line 47.
Lines 69:
Line 80:
And here's what I get as a $node-taxonomy object on save:
This works for new node creation. Seems to work also when editing an existing node.
Comment #14
agentrickardOne additional change.
Line 64 of aggregator2_autotaxonomy():
The current code: if (trim($category_name) != '') does not actually trim() the variable, which I think is necessary.
Comment #15
sillygwailoI'm attaching a patch made from the above code. I tested it and it updated old feed items along with keeping the taxonomy terms for new items. A couple of bugs remain, as far as I can tell
This gets us closer to fixing this issue, Ken.
Comment #16
sillygwailoAnother issue with the patch is that on the updated feed items, it dupilcates some tags if you're using free-tagging.
Comment #17
agentrickardHere's a copy of the module as I have it in production right now. It fixes the duplication issues.
Again, sorry for the lack of a proper patch.
Comment #18
agentrickardSoory. That last copy still has some debugging statements in it.
Comment #19
agentrickardOK. Progress. I added a routine to kill duplicate taxonomy terms that were showing up. I'm still not sure where they were coming from. I think aggregator2 is putting them in.
Anyway, I have this version running, error-free at http://www.rubybaboon.com/
Comment #20
agentrickardAlright one more time. After the last patch, the assigned item_taxonomy from the aggregator2_feed table wasn't getting saved. So I forced it into the aggregator2_autotaxonomy module.
Maybe not the best solution but I think it's working. (Again).