I had a working website with Drupal 5, Nodewords and Meta tags Node Type. Since the update to Drupal 6, I can not get Meta tags Node Type to work: The meta tags of Meta tags Node Type are not written in the source code of my nodes.

I use the following modules:
- Nodewords: now 6.x-1.3-alpha2 (before that I used 6.x-1.3-alpha1)
Nodewords itself is working. If I enter meta tags to a node, I see them in the source code.

- Meta tags Node Type: now the latest 6.x-1.x-dev
Everything in the administration area of Drupal seems normal: I see the input boxes of Meta tags Node Type in the Node Type area. The Meta Tag information is written in the input boxes and stored in my mysql database. But: These meta tags are not printed in the source code of these nodes.

I deinstalled and than installed the module again, but there still are no meta tags from Meta tags Node Type in my source code.
I cleared the cache several times.

Drupal is working fine. No errors in the error log.

I assume Meta tags Node Type is generally working? Do you have an idea what the problem could be or where to look for it?

Comments

planctus’s picture

Yeah, same problem here...
I'm struggling with nodewords too, actually.
It seems that this module is the only providing token support for meta tags, since the old "by path" module is included, with limitations in the meta tags module.
So i tested meta tags nodetype and i'm not getting any result or better...i see the default meta tags and if i delete them i lose the entry in head completely.
Don't know how to achieve a simple goal with D6 about meta tags...
thanks,
Da.

Phoenix2020’s picture

I found no way to get Meta tags Node Type to work until now. It seems to me as if the current "Nodewords" - package is not very stable at the moment (Alpha and Beta releases).

Because I needed a working solution as fast as possible, I did the following:
- For the front page and other simple nodes I use Nodewords/Meta Tags 1.0
- For node types that need token-based meta tags, I disabled Nodewords and use the module "Integrated Metatags" instead

Works great, no problems!

planctus’s picture

That could be a solution for now...
I switched to integrated meta tags but i'm losing the chance to set meta tags for "not-content-types" pages, now.
Thanks,
Da.

hanoii’s picture

Status: Active » Closed (won't fix)

I think this is not an issue any more with the latest nodewords 1.5 and the new 1.4 version of this module. Indeed, previous nodewords version where doing things differently, even so the 1.5 does, but I worked it out differently on the new release.

johnvsc’s picture

This is a Front End working solution if you are in a jam until this chronic problem gets resolved:

in the template.php of your theme:

function THEMENAME_compensate_for_nodewords(&$vars){
 // nodewords ain't working, so we need to compensate for it
// I am just printing out the ones that my client cares about -> drastic times
 $nodewords = $vars['node']->nodewords;
  if($nodewords){
 //$output = '';
 //abstract
 $output .= ($nodewords['abstract']['value']) ? '<META name="abstract" content="'.$nodewords['abstract']['value'].'">' : null;
 // description
 $output .= ($nodewords['description']['value']) ? '<META name="description" content="'.$nodewords['description']['value'].'">' : null;
 // keywords
 $output .= ($nodewords['keywords']['value']) ? '<META name="keywords" content="'.$nodewords['keywords']['value'].'">' : null;
 // revisit
 $output .= ($nodewords['revisit']['value']) ? '<META name="revisit" content="'.$nodewords['revisit']['value'].'">' : null;

 return  $output;
 }
}

In the same template.php, in a theme_preprocessing_page :

$vars['compensate_nodewords'] = THEMENAME_compensate_for_nodewords($vars);

In the above code -> make sure that the $vars is $vars or it could be $variables -> don't get tripped up by this typo :)

then in page.tpl.php, in the < head > section :

<?php print $compensate_nodewords; ?>

this is a D6 solution -> not sure about D7 .... yet

hopes this helps someone in a jam...

ayukko’s picture

johnvsc , thanks for your solution. I couldn't make it work though. Not sure I am missing something in the code you posted (newbie still). I have a question about this piece:

"In the same template.php, in a theme_preprocessing_page :

$vars['compensate_nodewords'] = THEMENAME_compensate_for_nodewords($vars);"

I added it at the end of an already existing THEMENAME_preprocess_page. Is it correct?

Thanks!