Kroc / NoNonsenseForum

A free, open source, PHP-based simple discussion forum. It favours removing barriers to conversation rather than massaging egos. Download Here: https://github.com/Kroc/NoNonsenseForum/archive/master.zip
http://camendesign.com/nononsense_forum
Other
247 stars 34 forks source link

Sitemap uses incorrect paths when the forum is installed in a subfolder. #191

Closed Zegnat closed 9 years ago

Zegnat commented 9 years ago

As reported on the forum by steve421:

Forum installed in example.com/f/ Meaning posts would be example.com/f/category/post All links in sitemap point to example.com/category/post

ghost commented 9 years ago

Index.xml

I attempted to replicate this issue and found that if you have the forum installed at / make the posts then move it to /f/, all posts made on / will continue to point to the path before the change.

Once a comment is made, the comment will point to the correct path on /f/ but if the comment is deleted it will snap back to /.

Solution

To correct this, the threads .rss file has to have the links replaced with the new location. (Notepad++ and then using Replace All is the best option I can think of.) You then just have to get index.xml to re-update.

Other Issues

Google Webmaster Tools throws a "Missing XML tag" error on all sitemaps and indexes as they are missing the "Tag: description" in "Parent tag: channel". Not sure if this would require another ticket.

Sitemap.xml

It seems that sitemap.xml is affected by this, it ignores the path folder and then just adds the sub-category folder. So like Steve421 and Zegnat have stated, the paths are incorrect. What should be /f/category/index.xml becomes /category/index.xml

Kroc commented 9 years ago

Fixed in development branch, thanks all.

@1Seann: Moving the forum is not supported. The XML files are all static and would have to be batch updated. I have a script locally for that, but not available in the repository. Ideally an admin console would be capable of doing this.