When using FeedAPI and the FeedAPI Element Mapper to map tags from a feed to the node being created, those tags do not show up in the Community Tags block.
When using FeedAPI and the FeedAPI Element Mapper to map tags from a feed to the node being created, those tags do not show up in the Community Tags block.
Comments
Comment #1
geodaniel commentedNote that they do get added if I edit the node and save it without making any changes.
Comment #2
SteveK commentedalso reporting same error but using FileFramework. Tags don't get propagated correctly when programmatically creating nodes. It appears to be failing at community_tags_taxonomy_node_save() or in the nodeapi hook when checking to see if $node->taxonomy['tags'] is available. Since the terms have already been processed, this no longer becomes applicable.
Comment #3
Chris Johnson commentedThe issue appears to be that Community Tags module is expecting $node->taxonomy['tags'] to be populated with strings representing the terms, but actually this isn't present if the tags have already been assigned term IDs, as happens in feedapi_mapper_taxonomy.inc.
It seems like community tags should be updated to handle IDs if that's all that's available.
Comment #4
chaps2 commentedI've tried this with Feeds (the successor to FeedAPI and Feed Element Mapper) and mapped tags displayed in the community tags block without any problem. I haven't tried File Framework yet but as that project is itself alpha I'm marking this as minor.
Comment #5
chaps2 commentedOK, it's starting to make sense now. I observed this behaviour when generating nodes with "devel generate". Terms automatically added to new nodes are added as an array of tids in $node->taxonomy where the community tags module is expecting term names in $node->taxonomy['tags']... which is exactly as described by Chris Johnson #3.
Now fixed in 1.x and 2.x.