Since updating to 6.x-1.1 the Page Title module http://drupal.org/project/page_title does not work. I have confirmed this on 3 of my sites and have found the reverting back to 6.x-1.0 fixes the problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sheena_d’s picture

Status: Active » Postponed (maintainer needs more info)

Can you give us some more details on this? How is it not working (i.e. what is the behavior you are seeing, or not seeing, that differs from how that modules usually works)? Also, are you testing with only Fusion Core enabled, or are you using a sub-theme of some sort?

carlodimartino’s picture

Ok Thanks. Yes I am using sub-themes and/or Fusion based themes in all instances where I am seeing the problem. To give you a specific example of the problem with a site for example: I'm using Acquia Marina with Page Title and have the page title patterns set as: Default: [site-name] | [page-title] & Frontpage: [site-name] | [site-slogan] but neither of these patterns work at all when using any Fusion Theme or sub-theme when using 6.x-1.1. Page titles instead show as the Drupal's default pattern: [site-title] | [site-name].

Even if I use Fusion core only and no sub-themes, I see this problem.

If I switch to a standard theme such as Bluemarine or revert to Fusion 6.x-1.0, the module works fine.

aquariumtap’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
1.2 KB

The attached patch adds support for the page_title module.

The reason page_title works in 6.x-1.0 and not 6.x-1.1 is the latter version introduced html tag sanitation (#868572) for the site slogan. This patch will bypass the sanitization if the page_module is active.

broncomania’s picture

this works 50% because the taxonomy titles is still not working. Is this part really nessesary? I mean the page title module resolves all wishes,so why do I need a preprocess function for the page title in a theme??

I hope this function will be extended with a checkbox if i wish to process the page title. So i could decide working page title or not.

I deleted the part of code and this is not a good solution I know, but it's working!

aquariumtap’s picture

Hi broncomania, the processing is in there because not everyone uses the page_title module, and we're building off default functionality to sanitize slogans.

The patch I sent you bypasses any Fusion processing if the page_title module is being used. I tested a taxonomy title using page_title, and it worked. Could you please describe the problem you're having a bit more ?

Duplika’s picture

Did indeed caused us unexpected issues with SEO.

I agree that it would be great to have a checkbox to decide if we want to use this or not.

aquariumtap’s picture

Hi Juanzo, what issue are you having? If the page_title module is in use, then the title comes straight from that module, without any modification by Fusion.

sauvymer’s picture

Title: Page Title module not working » download
Version: 6.x-1.1 » 7.x-1.0-alpha1
Component: Miscellaneous » Code
Category: bug » support
Status: Needs review » Active

Hello,

I can't to download le last version :
The requested URL /files/projects/fusion-7.x-1.0-alpha1.zip was not found on this server.

thanks
sauvy

aquariumtap’s picture

Hi sauvymer, I'm not sure what happened, but the fine folks at drupal.org have been working on it:

http://drupal.org/node/1153392

In the meantime, you can access the code by altering the link slightly (removing the "ftp." from ftp.drupal.org):

http://drupal.org/files/projects/fusion-7.x-1.0-alpha1.zip

stephthegeek’s picture

Title: download » Page Title module not working
Version: 7.x-1.0-alpha1 » 6.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

Changing back to actual issue

(downloads are fixed)

eule’s picture

whats about the page titles now? is it fixed in a dev version ? i put the fix in but i must say the same as @rectangle, for me is the taxonomy non working ..is any fix aviable?

thanks

aquariumtap’s picture

Yes, the fix is committed to dev. Please describe your problem in more detail. I was not able to replicate the taxonomy issue.

Duplika’s picture

I'm my case, having Page Title 6.x-2.3 and Fusion 6.x-1.1, our titles don't appear as configured at Page Title. This started happening when we updated to Fusion 6.x-1.1 and to fix it, we deleted the following code from fusion_core/template.php:

  // Replace page title as Drupal core does, but strip tags from site slogan.
  // Site name and slogan do not need to be sanitized because the permission
  // 'administer site configuration' is required to set and should be given to
  // trusted users only.
  if (drupal_get_title()) {
    $head_title = array(strip_tags(drupal_get_title()), variable_get('site_name', 'Drupal'));
  }
  else {
    $head_title = array(variable_get('site_name', 'Drupal'));
    if (variable_get('site_slogan', '')) {
      $head_title[] = strip_tags(variable_get('site_slogan', ''));
    }
  }
  $vars['head_title'] = implode(' | ', $head_title);  
}
aquariumtap’s picture

Hi Juanzo, thanks for the details -- the code you deleted does not have the patch from #3 applied.

Steady’s picture

I'm having the same problem.

I am using the latest fusion and a theme from topnotchthemes (fusiondrupalthemes).

It seems the page title module is just being ignored.

When creating content, the option to have a different page title than the usual drupal heading/title appears. But once the page is created, any alternative text entered that should appear in the tag is just ignored. It simply uses whatever I wanted to have as the heading on the page.

This is extremely annoying as the < title > and the heading < h1 > are usually a little different though related for seo purposes.

I am usure from the above, what the best correction is as I am a novice.

(What is starting to annoying me with drupal is that one gets warning messages to upgrade things, but almost everytime I do this, for core, modules or themes, there always seems to be problems. It's very frustrating to say the least and I am losing a bit of heart. My time is too valuable to waste and it is frustrating that I don't know enough to be comfortable in handling it when it goes wrong so much). Rant over...

aquariumtap’s picture

Steady, have you applied the patch from #3?

carlodimartino’s picture

I have a few alternative suggestions for you.
1. Apply the patch from #3 http://drupal.org/files/issues/page_title_module_compatibility-1144188.p...
works fine for me.
2. Roll back to fusion 6.x-1.0 http://drupal.org/node/848744
3. Maybe from now on you should only do security updates if other updates have been such a problem.
4. Stop using Drupal and demand a refund ;)

Steady’s picture

Hi,

I have been trying to understand how to apply the patch in 3.

I have never done this before and the data I have been able to find on it has me completely confused.

I honestly have been trying to find how to apply this patch for 3 or 4 hours with NO luck or understanding whatsoever.

It seems you have to be a programmer or something to do this. I really don't know how to...

Any further suggestions?

Thanks.

carlodimartino’s picture

aquariumtap’s picture

Hi Steady,

You don't have to be a programmer, but applying a patch can be tricky and we've all experienced your frustration in one way or another. It's a worthwhile thing to learn, and it'll help you over and over again if you work with Drupal, so it might be worth jumping onto IRC and joining the #drupal channel to chat and work through the problem in real time. Here's how to join IRC (Internet Relay Chat).

This particular patch if very small, so you could just apply it manually. Here are some instructions. In short, the lines that start with a minus (-) need to be deleted, and (+) need to be added. The more cryptic lines like this are just to help you find the lines that need to be removed/added:

+++ b/fusion_core/template.php
@@ -147,9 +147,12 @@ function fusion_core_preprocess_page(&$vars) {

I haven't committed this patch yet because I'm looking for testers, but this will likely be resolved sometime this week if you want to wait. At that point, the change will be in the latest version of Fusion-7.x-1.x-dev.

So you have a few options -- but I think it'd help a lot to chat with other Drupal people in real time, so you can describe specifically what's going wrong when you try to patch.

aquariumtap’s picture

Hah, thanks rectangle :)

Steady’s picture

Aquarium Tap,

That is a great and useful answer. Many thanks!

I will get into this more next week when I get more time.

In the meantime I appreciate your message.

Best wishes,

Steady

giorgio79’s picture

Status: Postponed (maintainer needs more info) » Active

Applied the patch, but did not fix it for me.

I had separate page title patterns for diffferent content types, but no luck.

giorgio79’s picture

Status: Active » Reviewed & tested by the community

Actually, I take that back.

Just had to clear cache.

Works like magic, this is much appreciated.

SchwebDesign’s picture

Thank you VERY much for this, i was really lost as to what was wrong until i found this thread. This fixed it for me as well!

nicholasThompson’s picture

The patch applied to the DEV branch is not quite right; there is no need to separately apply the Page Title value as Page title has its own preprocess_page hook. By fusion applying it, it will essentially happen twice. This is mitigated by the page_title_page_get_title() function statically caching the value.

Attached is an improved patch on the latest 6.x-1.x-dev branch.

nicholasThompson’s picture

Status: Reviewed & tested by the community » Needs review

Meant to set "needs review"...

angelil-il6’s picture

Hi.

I have the same problem.
I have read this post, and looked at the patch.
when I looked at it and at the template.php it was not complitly as I would have expected it to be.
so I have reinstall fusion theme to the current version, and looked at the file again.

this is what I have found, starting from line 152:

if (drupal_get_title()) {
$head_title = array(strip_tags(drupal_get_title()), variable_get('site_name', 'Drupal'));
}
else {
$head_title = array(variable_get('site_name', 'Drupal'));
if (variable_get('site_slogan', '')) {
$head_title[] = strip_tags(variable_get('site_slogan', ''));
}
}
$vars['head_title'] = implode(' | ', $head_title);
}

please write down the necessary changes that need to be modified.

Regards
Angel

radoya’s picture

I just removed all that code, leave just last } and it seams work for me now.

I hope that it will note make some other issues.

JayVGee’s picture

Assigned: Unassigned » JayVGee
Issue tags: +page titles module

I am currently having a problem with the page title module and a custom fusion sub-theme. I have installed the module and it seems to be working properly; except when I edit the page title field for an individual page, the page title doesn't show, I still get the default page title I setup in the page titles module settings. I have looked in the issue ques for the module and there is a patch, but when the patch is applied I am still not getting the results. I tried updating my theme to the most recent update for Fusion Core (not a critical update), but it crashed my site (the interface was all screwed up). I then reverted back to the previous version of Fusion Core and just updated the template.php file and tried applying the patch to it then, but I was getting the same page title results. Does anyone have any suggestions on what I could be missing? Thanks!

Oceanman’s picture

@JayVGee Do you have this in the head of your page template:

<title>  <?php print $head_title ?>  </title>

This was missing from mine and now I have titles showing up as expected. I hope that helps.

JayVGee’s picture

Thanks Oceanman, I appreciate the help but I already had that line in the page template file. In a nut shell I can set the default page title based on the specific content type in the 'Page Title' module settings. However, when I try to set the page title for specific pages, the default page title still comes up instead. Does anyone have ideas, I could really use the help.

Steady’s picture

Use an earlier version of fusion.

That was the only way I got page-title to work properly with a fusion based theme!!!

aquariumtap’s picture

Assigned: JayVGee » aquariumtap

I am preparing a new version of fusion with support for the page title module to be released this week.

JayVGee’s picture

Version: 6.x-1.x-dev » 6.x-1.1

Steady,

Thanks, but I am currently using Fusion 6.x-1.0, which I believe is the same version you were using and I was still having no success is setting the Page Title for a particular page; does work when I set a particular content type with a default Page Title however.

Aquariumtap,

Thanks, please let me know when it becomes available. Also, please refer me to any documentation on how to update a base theme without breaking the custom sub-theme. When I tried to upgrade to Fusion 6.x-1.1 it broke my site, Im not sure what I did wrong. See my post at number #30.

aquariumtap’s picture

@JayVGee - incompatibility with the page title module is a known issue from Fusion 1.0 to 1.1, but I'm not aware of any other issues that would have broken your site. Could you open a separate issue with more specifics? If "the interface was all screwed up", including screenshots would be helpful. Thanks!

aquariumtap’s picture

@nicholasThompson - your revised patch makes sense to me, but the page_title_page_get_title() function returns a static variable on a second call. It's very fast, and the patch as-is has been tested.

nicholasThompson’s picture

Version: 6.x-1.1 » 6.x-1.x-dev

That is true - a call to a function to return a static variable is fast. Cant argue with that :)

I guess the point I'm making is that it's unnecessary and inefficient. No matter how fast that function is, it will always be faster to not do it ;)

You'd never write code which did:

$a = static_function_value();
if (TRUE) {
  $a = static_function_value();
}

... because it's pointless and inefficient, but it's basically what DEV is doing. See:
http://drupalcode.org/project/fusion.git/blob/cea495e3455b7ead7315dc9827...

Page Title already implements it's own page preprocessor to handle this and it sets the $vars['head_title'] itself - by Fusion checking for the presence of Page Title and then re-setting the value using exactly the same function call (regardless of static caching), it's basically mimicking the above code. See:
http://drupalcode.org/project/page_title.git/blob/a9a5d31d9357fa13603b3c...

I set the Version back to 6.x-1.x-dev because that's where its still broken (imho) ;)

JayVGee’s picture

Aquariumtap,

Any updates on the new version of Fusion to be released to fix the 'Page Titles' issue? I am still having the same issue from post #32. Thanks!

aquariumtap’s picture

I"m testing right now :)

aquariumtap’s picture

@JayVGee - the issue from #32 doesn't appear to be specific to Fusion. I was able to recreate the issue on other themes. See #1220776: Can't change per node-type title

@nicholasThompson - I was following the instructions set by the page_title module, but as it turns out, they were for Drupal 5. Calling a function of another module to see if there's anything to do/modify is exactly what the Drupal hook system does. It's the most common pattern employed on this framework. But you're right, it wasn't necessary here. I've changed the fix to use your approach. Thank you.

brunorios1’s picture

subscribing

aquariumtap’s picture

Status: Needs review » Closed (fixed)

Fix has been committed with the 6.x-1.11 release.

carlodimartino’s picture

I'm afraid this is not working for me at all. I have tried 6.x-1.11 on 3 sites now all with the same results - Page Title module does not work at all and worse than that, with the module enabled I get no page titles at all. I'm just getting <title></title> in the page source.

eule’s picture

Status: Closed (fixed) » Active

same as @rectangle, getting no page titles

aquariumtap’s picture

Status: Active » Needs review
FileSize
553 bytes

Patch attached -- if someone else could test this, I will do another Fusion release right away to propagate the change more easily. I'm very sorry about the oversight.

eule’s picture

thanks! i get the page titles now

SchwebDesign’s picture

thanks for your attention to this matter

dev from 2011-Aug-04 doesn't work for me (and thus comment 46 i believe doesn't work for me: http://drupal.org/node/1144188#comment-4824984 )

BUT patch from comment 17 worked for me: http://drupal.org/node/1144188#comment-4527322

with Page Title module 6.x-2.5

aquariumtap’s picture

Status: Needs review » Closed (fixed)

Hi SchwebDesign, please update Fusion to the latest version (6.x-1.12). Again, sorry for the troubles!

asb’s picture

Thanks for the new release, this issue has been a major annoyance, and it's great that it's now resolved!

Jimmel’s picture

Hi

I am using Page Title 6.x-2.5 and Fusion 6.x-1.12 and the page title still does not work when I want to place different titles for each node.

Is the patch included in the lastest version of Fusion that I am using. Going by #49 it seems to be.

Is there any other problems.

Regards
Jimmel

sheena_d’s picture

Category: support » bug
Status: Closed (fixed) » Postponed (maintainer needs more info)

Jimmel,

The issue should be resolved with the 6.x-1.12 version of Fusion. Can you give us a few more details about the issue you are having and some tips on how to recreate the issue for testing?

Thanks,
Sheena

Jimmel’s picture

Hi

It looks like I have resolved it by going back to the default settings in page title configurations and then changing them again. Changing them without going back to the default settings did not seems to alter anything for the individual nodes. So Fusion and Page title now seem to be compatible.

Regards
Jimmel

sheena_d’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Thanks for the update!