Closed (fixed)
Project:
Nodewords: D6 Meta Tags
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2007 at 11:11 UTC
Updated:
2 Jun 2009 at 22:01 UTC
Meta description does not use the teaser of the page. It works normaly if something is specified as description. I also noticed that there are also duplicates of copyright and robots meta.
Comments
Comment #1
ambition13 commentedI am having this same problem. The rest of the module works great, other than showing the teaser as the meta description. Does anyone have a fix for this?
Comment #2
ambition13 commentedActually I figured out how to fix this, but I'm not sure if it is the proper way. It does work, so try it.
I added one line in sites/all/modules/nodewords/tags/description.inc:
if ($node && node_access('view', $node)) {
// HACK: see http://drupal.org/node/79315 (can't use php functions in
// body of nodes).
$cachable = filter_format_allowcache($node->format);
if ($cachable) {
// HACK: see http://drupal.org/node/89067 (teaser as description with
// [inline] error).
if (node_hook($node, 'view')) {
node_invoke($node, 'view', TRUE);
}
else {
$node = node_prepare($node, TRUE);
}
node_invoke_nodeapi($node, 'view', TRUE);
$value = $node->teaser;
}
$value = $node->teaser; // <--- ADDED THIS LINE HERE
}
Comment #3
Robrecht Jacques commentedIs this for each node content type?
I've tested this with the page content type and it works like it should.
Note that the module can't use the teaser of the node if the format used is "PHP code".
Comment #4
ambition13 commentedYes, my site only uses the "page" content type. So it isn't working as normal for that type. I am guessing the if statement isn't true, but I don't fully understand what it is testing for. Not a great programmer myself. All of my nodes use "full html" as the format. Let me know if you have any other questions.
Comment #5
avpadernoI am closing this report that is probably outdated.