YAFLogo

Posted by: BonzoFestoon - Tuesday, 14 March 2017 22:03:12
Why does this link work: [url=http://yetanotherforum.net/forum/search?search=test]http://yetanotherforum.net/forum/search?search=test[/url] But this one does not? [url=http://yetanotherforum.net/forum/search?search=test+error]http://yetanotherforum.net/forum/search?search=test+error[/url] If someone could please point me in the direction to look in the source. We recent did a mass clean up of posts in our forum (deleted about 3500 posts). However, there are were a good number of the posts indexed on the search engines. Instead of going to the login page, I modified the forum to generate some search words from the slug after the topic or message id. It works great except for when the slug has the word "error" in it. in posts.ascx.cs > page_load event, I am doing something like this: [code=csharp] // in case topic is deleted or not existent if (_topic == null || PageContext.PageTopicID == 0) { //YafBuildLink.RedirectInfoPage(InfoMessage.TopicDeleted); // better than before, but not good enuf var url = General.GetSafeRawUrl(); var topic = RemoveStopwords(url); YafBuildLink.Redirect(ForumPages.search, "search={0}", topic); } [/code] For now, I am filtering the words "error" and "errors". There is no problem if the user enters the word "error" in the search box, but if the word "error" is in the search query string param, it seems to lose its mind. Any help would be appreciated. P.S. The word "installation" also seems to break it. I really need to find the code that is causing this so I can cover all cases. Thanks!

Posted by: tha_watcha - Thursday, 16 March 2017 16:57:47
This issue is caused by the urlrewriter config. Only the two words error and install cause this problem. I commited the changes to fix the issue. you can apply the canges to your config file via [url=https://github.com/YAFNET/YAFNET/commit/0e3c9b3d163ce97179628318cc30d8366a9f6a2f]0e3c9b3d163ce97179628318cc30d8366a9f6a2f[/url]

Posted by: BonzoFestoon - Thursday, 16 March 2017 17:24:36
Ha! Thanks for the fix! It was driving me crazy! What are the odds I would find those two words within 5 minutes? I need to go and play the lottery! Fix is confirmed on my site. Thanks again!