Tokens fail under certain combinations (custom_pagers, _breadcrumbs modules installed)

NikLP - February 19, 2008 - 11:58
Project:Page Title
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:nicholasThompson
Status:closed
Description

The page_title mechanism fails when viewing nodes, but not when editing them. This bug has existed in page_title 2 since alpha 2, IIRC.

Something in the way that modules are cached (or something) breaks.

The fix for this is to add token_get_values('global', NULL, TRUE); before any calls to process the token substitution.

There is either something weird in the way that Eaton uses tokens in those two modules listed, or in the way that P_T implements tokens.

#1

nicholasThompson - February 19, 2008 - 17:00
Version:5.x-2.0-alpha5» 5.x-2.x-dev
Assigned to:Anonymous» nicholasThompson
Status:postponed (maintainer needs more info)» needs review

Please test this patch against DRUPAL-5--2

Issue cause: Other modules which are weighted 'lighter' (due to them beginning with, for example, the letter C rather than P) cause the Token Module to cache the token results BEFORE page_title had a chance to internally cache the viewed node. This means the token values did not have access to the node and therefore resorted to the default title provided by drupal_get_title.

This solves the problem by removing the internal cache and simply checking that the path is node/{nid}.

AttachmentSize
page_title_fix_get_title_error.patch 2.2 KB

#2

nicholasThompson - July 16, 2008 - 15:53
Status:needs review» fixed

Fixed in Alpha 6

#3

nicholasThompson - July 16, 2008 - 15:54

Fixed in Alpha 6

#4

Anonymous (not verified) - July 31, 2008 - 04:46
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.