CMS MADE SIMPLE FORGE

SiteMapMadeSimple

 

[#5742] RegisterRoute and pretty url is generating a invalid sitemap uri

avatar
Created By: Carsten Wiedmann (wiedmann)
Date Submitted: Tue Nov 23 16:58:16 -0500 2010

Assigned To:
Version: 1.2.2
CMSMS Version: None
Severity: Minor
Resolution: None
State: Open
Summary:
RegisterRoute and pretty url is generating a invalid sitemap uri
Detailed Description:
In addition to the fix in #2852

According to the sitemap specs, a sitemap.xml at "/sitemap.xml/1" or
"/index.php/sitemap.xml/1" is not valid for a page starting with the uri "/" or
"/index.php/".


History

Comments
avatar
Date: 2010-11-23 16:58
Posted By: Carsten Wiedmann (wiedmann)

---
Downloads/SiteMapMadeSimple-1.2.2/SiteMapMadeSimple/SiteMapMadeSimple.module.php
+++
public_html/cmsmadesimple-dev/modules/SiteMapMadeSimple/SiteMapMadeSimple.module.php
@@ -190,7 +181,7 @@
   {
     $this->RegisterModulePlugin();
     $this->RestrictUnknownParams();
-    $this->RegisterRoute('/[sS]itemap.xml\/(?P<mode>[0-9]+)$/');
+    $this->RegisterRoute('/^sitemap.xml$/');
   }
 
---
Downloads/SiteMapMadeSimple-1.2.2/SiteMapMadeSimple/function.admin_info_tab.php
+++
public_html/cmsmadesimple-dev/modules/SiteMapMadeSimple/function.admin_info_tab.php
@@ -29,7 +29,7 @@
 #-------------------------------------------------------------------------
 if( !isset($gCms) ) exit();
 
-$url = 'index.php?mact=SiteMapMadeSimple,1,default,0';
+$url = '/index.php?mact=SiteMapMadeSimple,1,default,0';
 $config =& $gCms->GetConfig();
 $show_generate = 0;
 
@@ -41,12 +41,12 @@
 else if( isset($config['assume_mod_rewrite']) && 
     $config['assume_mod_rewrite'] === true )
   {
-    $url = '/sitemap.xml/1';
+    $url = '/sitemap.xml';
   }
 else if( isset($config['internal_pretty_urls']) &&
 	 $config['internal_pretty_urls'] == true )
   {
-    $url = '/index.php/sitemap.xml/1';
+    $url = '/index.php/sitemap.xml';
   }
 
 $parms = array();

      
Updates

Updated: 2010-12-09 17:48
resolution_id: 11 => 5

Updated: 2010-11-23 16:58
version_id: -1 => 28784
resolution_id: => 11
severity_id: 12 => 3