Posted by calebtr on January 26, 2010 at 6:27pm
3 followers
Jump to:
| Project: | Community Tags |
| Version: | 6.x-1.0-beta2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I noticed that my search index is full of the phrases 'all tags' and 'my tags' for content types with community tags' inline form. These phrases are not part of the content and shouldn't be indexed.
To fix this, I added a conditional statement in community_tags_nodeapi that checks $node->build_mode and loads only the tags if the 'view' operation is being called by the search indexer.
if ($node->build_mode == NODE_BUILD_SEARCH_INDEX) {
$node->content['community_tags'] = array(
'#value' => community_tags_display('node', NULL, $node->nid),
'#weight' => 50,
);
}
else {
$node->content['community_tags'] = array(
'#value' => community_tags_node_view($node, TRUE),
'#weight' => 50,
);
}I created this patch against 6.x-1.0-beta2 though the problem still exists in beta3 and in 6.x-2.x-dev.
Comments
#1
@calebtr - thanks for the patch.
I decided it doesn't make sense to include the tags display in the search build mode view either, otherwise search keys would be dependent on UX settings - which is wrong. Besides, the terms should be included in the search view anyway. If I've missed something let me know.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.