CMS MADE SIMPLE FORGE

SiteMapMadeSimple

 

[#2161] Generated Sitemap URLs are all HTTPS instead of HTTP

avatar
Created By: blast blast (blast)
Date Submitted: Wed Mar 19 13:21:40 -0400 2008

Assigned To:
Version: None
CMSMS Version: None
Severity: None
Resolution: None
State: Open
Summary:
Generated Sitemap URLs are all HTTPS instead of HTTP
Detailed Description:
If logged on admin side of CMSMS with SSL turned on, all generated URLs of
sitemap file are preceded by HTTPS and not HTTP, making xml file not validated
with google parser.

I've changed these rows to solve problem
file 
/modules/SiteMapMadeSimple/SiteMapMadeSimple.module.php 
[code]
274  //$obj->encoded_url = cms_htmlentities($onecontent->GetURL()); original
275  $obj->encoded_url = str_replace("https" ,"http" ,
cms_htmlentities($onecontent->GetURL()) ); //modified by blast
[/code]
and these
[code]
282   //$obj->url = $onecontent->GetURL(); original  
283   $obj->url = str_replace("https" ,"http" , $onecontent->GetURL() );
//modified by blast
[/code]

Regards
blast


History

Comments
avatar
Date: 2009-04-30 09:59
Posted By: Robert Gruber (draak)

also, you can fix it on template level like me:

in extension->sitemap made simple>templates>sample

change:
{$page->url}

into:
{$page->url|replace:"https":"http"}
      
avatar
Date: 2009-04-30 10:24
Posted By: Robert Campbell (calguy1000)

This isn't a bug in the module
it's a problem with the default settings of the config.php

$config['root_url'] = 'http://svr.techcom.dyndns.org/cms_test/svn';
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
{
   $config['root_url'] = str_replace('http','https',$config['root_url']);
}

This would cause all urls to be replaced with https if the current URL is using
HTTPS
      
Updates

Updated: 2009-04-30 10:24
resolution_id: => 5
severity_id: 0 => 12