YAFLogo

Posted by: kheiser - Wednesday, 13 March 2024 22:46:59
This issue also related to search, but it's different from the issues in the other thread.  I think this might also be related to the forum pages being in the /Forums route but the controllers being in the root of the application.  Basically, I'm seeing any link generated in a controller have the route of the controller appended to the start instead of /Forums, and the rest of the link not being properly resolved.   For example the link to the post in search should be  /forums/Posts/PostName but instead it's coming showing up as  /Search/GetSearchResults?t=48&name=PostName&page=/Posts Quick reply has a similar issue. The link is coming from YAFNET.Core\Services\LinkBuilder.cs from the GetLink() method.  I'm not totally sure how this function works, or why it's different when being called from a controller.  Links for regular pages seem to be working fine.  I'm not sure if this is a bug or if I have something misconfigured.    

Posted by: tha_watcha - Wednesday, 13 March 2024 22:55:34
The problem is inside the controllers the link builder isn't aware or the area. I already resolved this issue by setting an area name in the appsettings... [url]https://github.com/YAFNET/YAF.SampleWebApplication/blob/afdff70d5d34919263fdd85bf8a01682df6c3769/YAF.SampleApp/appsettings.json#L31[/url] Then the link bilder generates the correct link. This will be fixed in 4.0.0 beta 6

Posted by: kheiser - Friday, 22 March 2024 16:38:01
I was still seeing the quick reply issue after the last update.  In line with some of the other changes you made, I changed line 260 in PostsModalController.cs to  [code=markup]                 new { m = newMessage.ID, t = this.PageBoardContext.PageTopicID, name = this.PageBoardContext.PageTopic.TopicName }));[/code] This seems to fix the issue.   It looks like there are other places where a similar change might be applied, but I haven't found any specific bugs around it, so I'm not sure.

Posted by: tha_watcha - Saturday, 23 March 2024 04:44:05
This affects all message links. They all do not work if the topic id is not provided. I split up the posts page in to a post page.  Now it generates topic links like... [code=markup]/Posts/[topicID]/topic-name[/code] and post  links like... [code=markup]/Post/[PostID]/topic-name[/code]