CMS MADE SIMPLE FORGE

CGFeedMaker

 

[#4230] Feed extension incorrectly generated - missing '.'

avatar
Created By: Lew Shepherdson (lew)
Date Submitted: Sat Oct 24 00:59:12 -0400 2009

Assigned To: Robert Campbell (calguy1000)
Version: 1.0.8
CMSMS Version: None
Severity: Major
Resolution: Fixed
State: Closed
Summary:
Feed extension incorrectly generated - missing '.'
Detailed Description:
The AutoDiscovery link generated is missing the '.' that separates the URL and
the feed extension. For example if feed alias is 'newsfeed' and feed extension
is 'xml', I get a URL of

.../feeds/newsfeedxml

when it should be 

.../feeds/newsfeed.xml

To fix it, in module 'CGFeedMaker.module.php' in the function 'CreateFeedURL' 

1. around line 268 is

	if( !empty($defext) )
	  {
	    $url = substr($url,0,strlen($url)-strlen($defext));
	    if( !endswith('.',$url) ) $url .= '.';
	  }

Remove the line

	    if( !endswith('.',$url) ) $url .= '.';

2. Change line 281 (now 280) from

	$url .= $ext;

to 

	$url .= ( endswith('.',$url) ? '' : '.' ) . $ext;

That fix seemed to work for me.

Lew


History

Comments
avatar
Date: 2010-12-02 03:32
Posted By: Sofia Hauschildt (sonya)

Any updates to this bug? It makes the module unusable without Lew Shepherdson's
hack.
      
Updates

Updated: 2015-05-25 18:14
resolution_id: => 7
cmsms_version_id: => -1
state: Open => Closed