Installing this module breaks all page titles, outputting 'Home' rather than the page title.

I use the Page Title module and the token [page-title] as default for all pages, anyone else getting this?

Comments

Web Assistant’s picture

Component: User interface » Code

In the module file, if I go to the _me_get_me_alias function, and comment out the following line (around line 468)

$replaced_alias = token_replace($alias, 'global');

The page title goes back as it should be, so I guess this has something to do with it?!

Johnny vd Laar’s picture

I'm suffering from the same problem when using custom breadcrumbs in combination with page title module.

deanflory’s picture

Priority: Normal » Critical

I too am getting this after enabling Me. This is a critical flaw and I'm amazed that after 2 years it's not yet fixed. I'm not sure how I can use this Me module now as it affects users and development, but disabling it after enabling it wreaks havok on all sorts of things like when I changed my username when it required a "-0" at the end, when re-enabled that went away. What is the status of the fixing of this extremely critical issue?

Is the edit in #1 a valid action? Does that affect anything else in a negative way?

voughndutch’s picture

I too have the same problem. Tried the fix in #1 and that doesnt work I get page not found errors.

donnycarette’s picture

After placing the token part in comments, the page titles and me module are back working.

function _me_get_me_alias($print = FALSE) {
  $alias = me_variable_get('me_alias');

  /* Replace with any global tokens that might have been used in the alias.
  if (module_exists('token')) {
    $replaced_alias = token_replace($alias, 'global');

    // They will not match if a replacement happened.
    if ($print && $replaced_alias != $alias) {
      $alias = ucwords(str_replace(array('-', '[', ']'), array(' ', ''), $alias));
    }
    else {
      $alias = $replaced_alias;
    }
  }*/

  return $alias;
}