I have clean installation of Drupal (6.20).
I enabled such modules:
Content Construction Kit (CCK) 6.x-2.8
- Content
- Text
Nodewords 6.x-1.x-dev (2010-Dec-02)
- Administration interface for Nodewords
- Basic meta tags
- Nodewords
- Tokens for meta tags
Token 6.x-1.15
Transliteration 6.x-3.0
Page Title 6.x-2.3 (2009-Nov-24)
I created the cck text field in "page" content type.
On Node Words Admin page I checked:
* Description In HTML tag HEAD,
* Enable tokens,
* Generate the token from the node body.
* As default Meta Tag Description I'm put [metatags-description].
Now in my new creation page I have descriptions is:
text: text value Body text
Another words in description nodewords put all content from page, not only body.
The same error and with 6.x-2.x-dev (2010-Dec-01)
If page title is disabled every think ok.
Only body in description.
The same issue in Nodewords http://drupal.org/node/1016270
| Comment | File | Size | Author |
|---|---|---|---|
| Bug.jpg | 184.49 KB | Andrew Gorokhovets |
Comments
Comment #1
nicholasthompsonErm - this looks like a bug with Nodewords - not Page Title. Page title only effects the <title> element, not the <meta> elements.
Comment #2
Andrew Gorokhovets commentedok, thanks!
Comment #3
Andrew Gorokhovets commentedIssue is here http://drupal.org/node/1016270
Comment #4
Andrew Gorokhovets commentedIt is a problem with Page Title.
May be in page_title_page_get_title function or in the node_page_title_pattern_alter.
If I comment line 550 (page_title.module)
$title = token_replace_multiple($page_title_pattern, $types);or 31 (node.page_title.inc)
$types['node'] = menu_get_object();Everything Ok!
Body token not destroyed.
I'm trying others body tokens:
http://drupal.org/node/181546#comment-3002566
http://drupal.org/node/181546#comment-2760684
But with the same result:
In output of the body token ($node-> body) came all cck fields which are above on the page (look screenshot)
Comment #5
nicholasthompsonI cant explain or replicate that!
I'll have to investigate...
Comment #6
Preishals commentedI have problems with Tokens in pagetitle, too.
I think it is a browser problem.
In Firefox works it fine.
If I use IE or Chrome my Tokens disappear in Page Title. :-(
Comment #7
bartezz commentedI'm having similar problems and can confirm page_title.module is causing this. Tested by disabling the module, and later by enabling the module and commenting line #564
$title = token_replace_multiple($page_title_pattern, $types);It's not a browser issue AFAIK, when dsm() the $node variable in tpl.php the body is just NULL when page_title.module is enabled.
Will try to figure out where things go wrong but the issue def is real :(
Cheers
Comment #8
bartezz commentedWell I'm not sure but the code at line #564 reads
$title = token_replace_multiple($page_title_pattern, $types);Not sure what $types does in there, but when I do this;
$title = token_replace_multiple($page_title_pattern);The page titles are replaced as expected and the body isn't NULL anymore?!
token_replace_multiple()has been changed between D5 and D6, maybe this has been overlooked?Cheers
Comment #9
nicholasthompsonThe
$typesparameter lets you pass objects into tokens to define scopes. Without types, tokens just operates in a Global scope.See:
http://drupalcontrib.org/api/drupal/contributions--token--token.module/f...
Could you please define your Page Title settings? I am unable to replicate this myself. Are you able to replicate it on a clean/simple D6 install?
Comment #10
bartezz commentedThe settings are as followed;
Default: [page-title] // [site-name] - test
Frontpage: [site-slogan] // [site-name]
Pager suffix: // [current-page-number]
Rest is empty. It's a fairly new setup, not live, containing 3 page nodes with a cck image field and 1 webform node. That's it!
The tokens seem to operate fine in 'gobal scope' just not when $types is given as a argument in the function call.
I've tried with Garland, thinking it might be my custom theme but the problem remains.
I've disabled other modules one by one and the problem just exists when page titles is enabled.
Anyway here's my module list:
Modules:
(Part of Advanced CSS/JS Aggregation)
(Part of Advanced CSS/JS Aggregation)
(Part of Advanced CSS/JS Aggregation)
(Part of Advanced CSS/JS Aggregation)
(Part of Ajax)
(Part of Ajax)
(Part of Ajax)
(Part of Ajax)
(Part of Ajax)
(Part of Core - required)
(Part of Spam control)
(Part of User interface)
(Part of User interface)
(Part of CCK)
(Part of CCK)
(Part of Chaos tool suite)
(Part of Date/Time)
(Part of Core - optional)
(Part of CCK)
(Part of Development)
(Part of CCK)
(Part of CCK)
(Part of FileField Paths)
(Part of Core - required)
(Part of Location)
(Part of Location)
(Part of ImageCache)
(Part of ImageCache)
(Part of ImageCache)
(Part of CCK)
(Part of CCK)
(Part of User interface)
(Part of User interface)
(Part of Core - optional)
(Part of CCK)
(Part of CCK)
(Part of SEO)
(Part of Core - optional)
(Part of Core - optional)
(Part of Core - optional)
(Part of Core - optional)
(Part of Core - optional)
(Part of Core - required)
(Part of Taxonomy)
(Part of Core - optional)
(Part of Taxonomy)
(Part of CCK)
(Part of Core - optional)
(Part of Core - optional)
(Part of Core - required)
(Part of User interface)
(Part of Views)
(Part of Views)
(Part of Webform)
Cheers
Comment #11
bartezz commentedAhhhhh! One module I didn't check; Sexy Bookmarks!
This module in combination with Page Title enabled causes the body NULL...
Can you check if you can replicate now?
Cheers
EDIT: I have another content type called portfolio which is the same as the page cck but then with a taxonomy tag field added, I found out that the Google Plus button was missing here when viewing the node. I disbaled Page Title and it worked again. Even with Sexy Bookmarks enabled. I can't find out why there's a difference between the body field breaking or not or google plus button showing or not beteen the two cck types. I've also tried changing the page title module weight to -1 or 99 to no avail :(
Comment #12
bartezz commented@andrey_jw; are you using sexybookmarks D6-2.0? I've downgraded to D6-1.x and the problem was gone. So I've done some debugging and tracked it down, my findings are posted here: http://drupal.org/node/1397688
Comment #13
virtuali1151 commentedI can also confirm this is an issue with Page Title and Nodewords.. if I disable Page Title the generation of the Meta Description from the Body or Teaser works fine...
Comment #14
virtuali1151 commentedHas anybody been able to figure out why the body token is getting destroyed when page title is enabled..??
I am using:
page title: 6.x-2.x-dev
nodewords: 6.x-2.0-alpha1
Comment #15
virtuali1151 commentedI am not using sexybookmarks and the node body does not get pulled into the meta description when using the meta desc token... Has anybody else had this behavior when page title is enabled? If I disable page title the meta desc does get pulled from the node body.