RSS feed problem
Permalink
On my blog, the RSS feed will generate a feed, but when the title of that page is chosen, there is a 404 error. The problem is that the code for the URL has an extra /content/ in it. Where is the code for the URL is generated in Concrete 5 so we can change it?
Blog where feed comes from:
http://www.rodnikkel.com/content/index.php/saddle-tree-blog-from-sh...
URL that comes from the RSS feed from there that causes the 404 error:http://www.rodnikkel.com/content/content/index.php/saddle-tree-blog...
URL that works after you remove /content from it:
http://www.rodnikkel.com/content/index.php/saddle-tree-blog-from-sh...
Blog where feed comes from:
http://www.rodnikkel.com/content/index.php/saddle-tree-blog-from-sh...
URL that comes from the RSS feed from there that causes the 404 error:http://www.rodnikkel.com/content/content/index.php/saddle-tree-blog...
URL that works after you remove /content from it:
http://www.rodnikkel.com/content/index.php/saddle-tree-blog-from-sh...
Which blog are you using. The built in addon or one you got from the marketplace?
Yes it is.
It appears you got this sorted out? I just tested it and it appears to be working.
No, it is not working yet. It gives the feed page, but when you click on a title on that feed page in order to see the whole blog page I still get the 404 error.
Hmmm. What do you have in your /config/site.php for BASE_URL
Don't post that whole file here. Just that one value.
Don't post that whole file here. Just that one value.
The base url is:
define('BASE_URL', 'http://www.rodnikkel.com');
define('BASE_URL', 'http://www.rodnikkel.com');
This problem occurs whenever C5 is installed in its own folder, rather than at the document root folder of the site.
The script responsible for building the RSS feed is /concrete/blocks/page_list/tools/blog_rss.php. On line 37, it builds a link to the blog post:
The problem is, "DIR_REL" is used here, which redundantly adds in the sub-folder that C5 is installed to. "getLinkToCollection($cobj)" already includes that portion of the file path. So if C5 is installed in a folder called "/content", the resulting link will read:http://<sitename>.<tld>/content/content/<blog_page&g...
To fix this, I created an override for blog_rss.php, located in /blocks/page_list/tools, and changed line 37 to read:
I'm not sure if this is going to have to be fixed in 5.5 or not, since it no longer uses DIR_REL as far as I've been able to tell.
The script responsible for building the RSS feed is /concrete/blocks/page_list/tools/blog_rss.php. On line 37, it builds a link to the blog post:
<?php echo BASE_URL.DIR_REL.$nh->getLinkToCollection($cobj) ?>
The problem is, "DIR_REL" is used here, which redundantly adds in the sub-folder that C5 is installed to. "getLinkToCollection($cobj)" already includes that portion of the file path. So if C5 is installed in a folder called "/content", the resulting link will read:http://<sitename>.<tld>/content/content/<blog_page&g...
To fix this, I created an override for blog_rss.php, located in /blocks/page_list/tools, and changed line 37 to read:
<?php echo BASE_URL.$nh->getLinkToCollection($cobj) ?>
I'm not sure if this is going to have to be fixed in 5.5 or not, since it no longer uses DIR_REL as far as I've been able to tell.