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

ambition13’s picture

I 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?

ambition13’s picture

Actually 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
}

Robrecht Jacques’s picture

Status: Active » Postponed (maintainer needs more info)

Is 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".

ambition13’s picture

Yes, 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.

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I am closing this report that is probably outdated.