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

CommentFileSizeAuthor
Bug.jpg184.49 KBAndrew Gorokhovets

Comments

nicholasthompson’s picture

Project: Page Title » Nodewords: D6 Meta Tags
Version: 6.x-2.3 » 6.x-1.x-dev

Erm - this looks like a bug with Nodewords - not Page Title. Page title only effects the <title> element, not the <meta> elements.

Andrew Gorokhovets’s picture

ok, thanks!

Andrew Gorokhovets’s picture

Status: Active » Closed (duplicate)
Andrew Gorokhovets’s picture

Title: Not compatibly with Nodewords » Destroyed body token
Project: Nodewords: D6 Meta Tags » Page Title
Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Closed (duplicate) » Active

It 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)

nicholasthompson’s picture

I cant explain or replicate that!

I'll have to investigate...

Preishals’s picture

Version: 6.x-2.x-dev » 6.x-2.5

I 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. :-(

bartezz’s picture

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

bartezz’s picture

Well 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

nicholasthompson’s picture

Status: Active » Postponed (maintainer needs more info)

The $types parameter 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?

bartezz’s picture

The 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:

Name Version
 
Advanced CSS/JS Aggregation
(Part of Advanced CSS/JS Aggregation)
6.x-1.6
AdvAgg Bundler
(Part of Advanced CSS/JS Aggregation)
6.x-1.6
AdvAgg Compress CSS
(Part of Advanced CSS/JS Aggregation)
6.x-1.6
AdvAgg Compress Javascript
(Part of Advanced CSS/JS Aggregation)
6.x-1.6
Ajax
(Part of Ajax)
6.x-1.x-dev
Ajax plugin - captcha
(Part of Ajax)
6.x-1.x-dev
Ajax plugin - disable_redirect
(Part of Ajax)
6.x-1.x-dev
Ajax ui
(Part of Ajax)
6.x-1.x-dev
Ajax plugin - webform
(Part of Ajax)
6.x-1.x-dev
Backup and Migrate 6.x-2.4
Block
(Part of Core - required)
6.22
CAPTCHA
(Part of Spam control)
6.x-2.4
   
CKEditor
(Part of User interface)
6.x-1.6
CKEditor Link
(Part of User interface)
6.x-1.2
Clone module 6.x-1.3
Colorbox 6.x-1.1
Computed Field
(Part of CCK)
6.x-1.0-beta5
Content
(Part of CCK)
6.x-2.9
Chaos tools
(Part of Chaos tool suite)
6.x-1.8
Date API
(Part of Date/Time)
6.x-2.7
Database logging
(Part of Core - optional)
6.22
Deck
(Part of CCK)
6.x-1.2
Devel
(Part of Development)
6.x-1.26
Fieldgroup
(Part of CCK)
6.x-2.8
FileField
(Part of CCK)
6.x-3.10
FileField Paths
(Part of FileField Paths)
6.x-1.4
Filter
(Part of Core - required)
6.22
Global Redirect 6.x-1.4
GMap
(Part of Location)
6.x-1.1
GMap Macro Builder
(Part of Location)
6.x-1.1
Google Plus One +1 6.x-1.1
ImageAPI
(Part of ImageCache)
6.x-1.10
ImageAPI GD2
ImageCache
(Part of ImageCache)
6.x-2.0-beta12
ImageCache UI
(Part of ImageCache)
6.x-2.0-beta12
ImageField
(Part of CCK)
6.x-3.10
ImageField Tokens
(Part of CCK)
6.x-1.0
jQuery UI
(Part of User interface)
6.x-1.5
jQuery Update
(Part of User interface)
6.x-2.0-alpha1
Menu
(Part of Core - optional)
6.22
Menu attributes 6.x-2.0-beta1
Menu Block 6.x-2.4
Number
(Part of CCK)
6.x-2.8
Option Widgets
(Part of CCK)
6.x-2.8
Page Title
(Part of SEO)
6.x-2.5
Path
(Part of Core - optional)
6.22
Path redirect 6.x-1.0-rc2
Pathauto 6.x-2.0
PHP filter
(Part of Core - optional)
6.22
Search
(Part of Core - optional)
6.22
Search 404 6.x-1.11
Search config 6.x-1.6
SexyBookmarks 6.x-2.0
Statistics
(Part of Core - optional)
6.22
Syslog
(Part of Core - optional)
6.22
System
(Part of Core - required)
6.22
Tagging AJAX
(Part of Taxonomy)
6.x-1.0-beta
Taxonomy
(Part of Core - optional)
6.22
Taxonomy Manager 6.x-2.2
Taxonomy Token
(Part of Taxonomy)
6.x-1.4
Text
(Part of CCK)
6.x-2.8
Token 6.x-1.18
Transliteration 6.x-3.0
Update status
(Part of Core - optional)
6.22
Update status advanced settings 6.x-1.1
Upgrade status 6.x-1.1
Upload
(Part of Core - optional)
6.22
User
(Part of Core - required)
6.22
Vertical Tabs
(Part of User interface)
6.x-1.0-rc2
Views
(Part of Views)
6.x-2.16
Views UI
(Part of Views)
6.x-2.16
Views node field
Webform
(Part of Webform)
6.x-3.15
Word Filter 6.x-1.1

Cheers

bartezz’s picture

Ahhhhh! 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 :(

bartezz’s picture

Priority: Critical » Normal

@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

virtuali1151’s picture

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

virtuali1151’s picture

Has 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

virtuali1151’s picture

Status: Postponed (maintainer needs more info) » Active

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