I have a page on a dev site containing 'print site_map_page();' ( http://gwwc2.centreforeffectivealtruism.org/about-us/site-map.php ). This causes the search results page for any search which turns up this page (e.g. http://gwwc2.centreforeffectivealtruism.org/search/node/aid ) to have the title 'Site Map', which is the title of this page.

Files: 

Comments

Status:Active» Needs review

Looking into it. Can anyone else confirm?
Thank you.

Thanks, I'm sure this is a genuine issue :)

I should say the URLs I gave above have changed to http://gwwc2.centreforeffectivealtruism.org/about-us/site-map.php and http://gwwc2.centreforeffectivealtruism.org/search/node/aid as I've changed my dev site's URL. I'll edit my OP accordingly...

Status:Needs review» Active

Changing back to active, thought there was a patch.

Changed to active until there is a patch.

I have created a small patch that checks the current page title if the page is sitemap page then only it sets the title entered in configuration of sitemap otherwise it keeps the current page title intact.Please review the patch and provide feedback.

I also came across an alternate solution where we can change the hook_menu
from
$items['sitemap'] = array(
'title' => 'Site map',
to
$items['sitemap'] = array(
'title' => variable_get('site_map_page_title', t('Site map')),

It works well but it has a barrier that after any change in value of Page title in sitemap configuration the user need to clear the drupal cache.

darrellulm let me know if you want me to create a patch for same?

Is it not simpler to just print "theme('site_map')" instead of "site_map_page()"?

Agreed, w/ comment above this one:
http://drupal.org/node/1510080#comment-6452010

And I need to take the time to look at your patches and some other ones.

patch #5 work for me.

Thanks @truyenle, let me (or someone) test that with the current dev release so we can see if the patch applies. You may have done this already.

Looks like a reasonable solution.

Issue summary:View changes

updating broken dev site URLs