Hi - I'm not sure if this is a Page Title issue or a Token issue, or some conflict with another module I'm using, so I'll try to explain my problem as clearly as possible, and please feel free to reassign this as necessary.
I am running a D7 site (7.4) with Page title 7x-2.5 and Token 7.x-1.0-beta3. My issue is that standard node and page tokens don't seem to be working - most of my patterns (for almost all content types) are:
[current-page:title] | Advantage [node:field-site-section:name]
and I've tried:
[node:title] | Advantage [node:field-site-section:name]
The default is set to:
[current-page:title] | [site:name]
All that shows, on all content types, is " | Advantage Companies" (Advantage Companies is the site name).
So, it seems that the site name token is working, but the rest are showing as blank. Further, the default is overriding the per-content page titles (as they all show [site:name] instead of Advantage [node:field-site-section:name]).
All the admin pages show correct page titles. It's only the outward-facing pages that are not showing correctly. Taxonomy pages have the same issue as the content type pages.
Here are some nmodules i'm using, just in case there could be conflicts - I've searched issue queues and done plenty of general searches, but I definitely may have missed something:
pathauto
sub-pathauto
lexicon
display suite
fieldgroup
references
corresponding node references
profile2
there are more, so if you suspect something, please ask. Thanks for help on this perplexing issue!
Comments
Comment #1
pyrello CreditAttribution: pyrello commentedsubscribing.
Comment #2
scarr CreditAttribution: scarr commentedComment #3
swainjo CreditAttribution: swainjo commentedI have the same issue in Page Title and also in passing a Token to a panel page.
It seems to be the current-page tokens that don't work.
I am happy to supply any further info about my config if useful.
js
Comment #4
Dave ReidIf [current-page:title] does not work then it means drupal_get_title() returned nothing - there's not much we can really do from Token module to fix that. Something has to call drupal_set_title().
Comment #5
swainjo CreditAttribution: swainjo commentedDave,
I am trying to output these tokens from a context in a panal page.:
%token:current-page:url
%token:current-date:short
%token:current-page:title
%token:current-page:query
the first two work fine; nothing returned for last 2.
If you are saying this is not a Token module issue, where do you suggest I need to look/post this problem?
regards,
js
Comment #6
swainjo CreditAttribution: swainjo commentedDave,
this would seem to be related to this issue you have raised http://drupal.org/node/1198032
There seems to be a general issues with tokens not returning the correct (or any) values.
Can you shed any more light on how I might follow this up?
thanks,
js
Comment #7
Dave ReidThis is not at all related to #1198032: The [current-page:url] token should include the query string. The current-page:query token will only work if you give it more input. For example, if the current page is http://www.example.com/node/1?foo=bar then current-page:query:foo would return 'bar'. Using just current-page:query will in fact output nothing.
Like I've said before about current-page:title, it uses drupal_get_title(). If the token returns nothing, this is by design as drupal_get_title() returned nothing.
Comment #8
drupalSeema CreditAttribution: drupalSeema commentedWhen has query string added in it, the tokens do not work ?test=12. I am facing this issue.