Hey hope someone can help me with this issue;

My page title module is not working correctly, that is, the additional words i add in the page title through the module are not shown. This problem appears every now and then. When i clear Drupal's cache the problem disappears! After some time (probably like half a day) the module just stops working correctly and i have to clear Drupal's cache. It's very annoying. Does anyone have any ideas?

Thanks!

Comments

I set the page titles up a few days ago and it was working just fine then. Now I go onto the site today and suddenly they're missing. I cleared the cache, and just like he says above, they work again.

Same problem here, with Drupal 7.12. Did anyone manage to find what's causing it?

Noticed the same thing here; after a undetermined period of time tokens are no longer replaced until cache is cleared. Have not had time to investigate further yet...

Status:Active» Needs work

This is unusual - I've not experienced this on my own sites which uses this module.

What cache settings do you guys have (under the performance section)? You're not using Memcache or any other funky backend are you?

Is the problem that token value appear as raw (eg [page:page-title])?

If the problem was anywhere with Page Title, it would be around this function:

<?php
/**
* Get the Page Title Setttings
*/
function page_title_get_settings($flush = FALSE) {
  static
$settings = NULL;
 
// Flush the settings, if set.
 
if ($flush) {
   
$settings = NULL;
   
cache_clear_all('page_title:settings', 'cache');
  }
 
// If we have it statically cached, return it.
 
if (!empty($settings)) {
    return
$settings;
  }
 
// Get from the cache, if present
 
if ($cache = cache_get('page_title:settings')) {
   
$settings = $cache->data;
    return
$cache->data;
  }
...
...
?>

But if it cant find valid settings, it fails back to generating them from scratch and rebuilding the cache.

If this is an issue with PT, it certainly is something we need to look at.

Is this related to #1136512-1: Available Tokens List is empty? I have fixed that bug in dev and 2.6 shouldn't suffer that issue..

Version:7.x-2.5» 7.x-2.7

I'm still having this issue in two sites trying to fix for a client using 2.7 version. Initially I thought it was related to an incompatibility with panels but only one of the sites is using panels pages.

Symptoms are the same as OP clearing cache shows the title but after approx half a day it's gone again. Also it seems to affect the [current-page:page-title] token only. Site name token is unaffected and displayed correctly.

Anyone have any ideas how to fix?

Cache settings were set to not cache for anonymous users. Have enabled minimum cache time settings for anonymous users and one site has been ok for 24 hours the other for three days now.

Has no one who experienced this issue have any pointers for solutions or workarounds?

Is it possible that it is a tokens issue rather then a Page Title issue?

Thanks

Experiencing the same problem here. [current-page:page-title] randomly stops working. Disabling custom modules, clearing caches and using token_clear_cache(); seems to clear the problem, even after the modules are re-enabled.. But only for so long.

Same problem with views datasource module stops working now and then, emptying cache fixs it.

I've also been experiencing this issue. My colleague mparker17 and I have been discussing and we think the problem is in page_title_get_title() where it does an is_null() check. I think that check should be empty() instead because I don't think drupal_static() will ever return a null value (I may not understand drupal_static() well enough though.)

I've generated a patch based on that idea and we're testing it internally now.

Status:Needs work» Active

Same issue for us:

Symptoms are the same as OP clearing cache shows the title but after approx half a day it's gone again. Also it seems to affect the [current-page:page-title] token only. Site name token is unaffected and displayed correctly.

drupal_static() is meant to return NULL for unset variables.

Nice menus has the same behavior. I installed the same contributed modules, and selected same core modules in a fresh drupal installation, and this new site appears to behave ok, so maybe is got to do with configuration.

Do you guys have google_analytics module installed I think that's it.