Hi, Did all installation as described, I see the other metatags for custom pages coming up, but no pagetitle shown. What could be wrong please?

greetings, Martijn

Comments

summit’s picture

StatusFileSize
new114.16 KB

Attached my settings on custom metatags page. Greetings, Martijn

summit’s picture

As you can see looking at the source of this page: http://www.campings-europa.com/land/België
Description and keyword metatags are working fine. But pagetitle metatag is not shown.
What could be the problem please?
This page is a panel-page filled with views and other content.

greetings,
Martijn

Brian294’s picture

Could you give me screenshot of this page?
admin/content/nodewords/settings

I'd like to see how you've configured the page title property on this page.

Brian294’s picture

Also, what version of the Page Title module are you using?

Brian294’s picture

Also, I need you to:

1. Replace the code in the nodewords_pagetitle_page_title_alter function to the example at the bottom of this comment. You will find this code in the nodewords_pagetitle.module file.
2. Clear your theme registry cache (Performance section in Drupal admin)
3. Go to the page that is having the page title problem.
4. Copy the variable dump at the top of the page. It will look something like: array(2) { ["type"]=> int(10) ["id"]=> string(1) "1" } ...
5. Paste the results into a new comment on this issue so I can see it.

function nodewords_pagetitle_page_title_alter(&$title) {
	// Try to guess the $type and $id by looking at $_GET['q'].
	// Private function borrowed from nodewords module.
	if (function_exists('_nodewords_detect_type_and_id')) {
		// Depreciated with Nodewords API 1.14
		$options = _nodewords_detect_type_and_id();
	}
	else {
		$options = nodewords_detect_type_id();
	}
	
	var_dump($options);
	var_dump(_nodewords_custom_pages_load_data($options['id']));
	
	switch ($options['type']) {
		// NODEWORDS_TYPE_PAGE
		case 10:
			// Load the page meta tags data from the database.
			// Private function borrowed from nodewords_custom_pages	
			$page_data = _nodewords_custom_pages_load_data($options['id']);
			$title = $page_data->tags['page.title']['value'];
			break;
	}
}
summit’s picture

StatusFileSize
new180.31 KB

Hi Brian,
Variable dump is the following on the page: http://www.campings-europa.com/land/België

array(2) { ["type"]=>  int(10) ["id"]=>  string(1) "1" } object(stdClass)#445 (6) { ["pid"]=>  string(1) "1" ["path"]=>  string(28) "land/België land/België/*" ["weight"]=>  string(1) "0" ["enabled"]=>  string(1) "1" ["name"]=>  string(11) "Land-Belgie" ["tags"]=>  array(3) { ["description"]=>  array(1) { ["value"]=>  string(82) "Campings Belgie. Kamperen familiecampings, natuurcampings, minicampings in België" } ["keywords"]=>  array(1) { ["value"]=>  string(16) " campings belgie" } ["page.title"]=>  array(1) { ["value"]=>  string(74) "Campings in Belgie, kamperen familiecampings, natuurcampings, minicampings" } } }     

I am using the latest .dev version of the module (2010-Jun-20).
Attached asked screenshot of admin/content/nodewords/settings.

Thanks for going into this!
Greetings,
Martijn

Brian294’s picture

Thanks Martijn,
What versions of Page Title module (http://drupal.org/project/page_title) and Nodewords module (http://drupal.org/project/nodewords) are you using?

Peace,
Brian

Brian294’s picture

BTW, everything is perfect with the variables that are output by your site. Which leads me to believe your nodewords installation might have a problem.

summit’s picture

Hi, Brian,

Nodewords 6.x-1.12-beta9, with a very small patch: http://drupalcode.org/viewvc/drupal/contributions/modules/nodewords/node...
and Page Title 6.x-2.3 .

What could be the problem please?
I also use Panels 3.5 and Ctools 1.6. I set panels internal pagetitle setting to none, right?

Thanks for your help so far, hopefully you can help to get it working!

greetings,
Martijn

summit’s picture

Status: Active » Fixed

Hi Brian,

It is working.
I had a problem on page.tpl.php.
Didn't had the right: print $head_title;

Thanks a lot for all your help!
Greetings, Martijn

Brian294’s picture

ah! I was going to suggest something with the page.tpl.php! A couple days ago, I found the code for the template you are using and it was using the $head_title variable, so I completely dismissed that possibility. Well done!

Brian294’s picture

Category: bug » support
Status: Fixed » Closed (fixed)