YAFLogo

BWG
  • BWG
  • 100% (Exalted)
  • YAF Lover Topic Starter
9 months ago
Hi,

I've noticed on 3.2.6 it doesn't appear to be possible to move a post to a topic in a different forum. When "Selecting Forum to move to" the list of topics doesn't update to reflect the new forum which has been selected. I've not had chance to step through the code yet.

BWG

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
9 months ago
At least with the latest version i cant reproduce the issue. Are there any javascript errors in the browser console? This is ether an js issue are an issue with the web api. Are functions like the thanks button working?
BWG
  • BWG
  • 100% (Exalted)
  • YAF Lover Topic Starter
9 months ago
I've done some quick testing on my dev server. 

1) Occasionally the topics from the selected forum are appended to the dropdown "Select Topic to move to" but I can't yet work out actions cause this. Most of the time changing the selection in the Select Forum to move to: doesn't do anything

2) There aren't any javascript errors in the console either on production or dev installations

3) The tanks function is working

BWG
  • BWG
  • 100% (Exalted)
  • YAF Lover Topic Starter
9 months ago
I'm assuming this api method should fire when the "Select Forum to move to" is changed but it doesn't.

My production deployment has some bespoke javascript code in default.aspx, but I've removed that on the test server and it doesn't make any difference. 

I'll try and investigate further in the next few days.

​ public IHttpActionResult GetTopics(SearchTopic searchTopic)
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
8 months ago
I must be blind i did not write the java script that loads the topics select after the forum is selected. Issue will be fixed in the next release.
BWG
  • BWG
  • 100% (Exalted)
  • YAF Lover Topic Starter
8 months ago

I must be blind i did not write the java script that loads the topics select after the forum is selected. Issue will be fixed in the next release.

Originally Posted by: tha_watcha 

👍Thanks - I know from personal experience in software development that it is very easy to overlook the obvious and search for a more complicated explanation. I'll look out for the fix.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
8 months ago
I already committed to fix to the source repository. 
BWG
  • BWG
  • 100% (Exalted)
  • YAF Lover Topic Starter
8 months ago
Just made the changes in the fix below but am still experiencing the same problem. It's odd because sometimes the topics from the newly selected forum are appended (rather than replacing the existing list) to the "Select Topic to move to:" list and sometimes they aren't. There aren't any javascript errors in the console.

https://github.com/YAFNET/YAFNET/commit/40d3b7568e9d523fe019fb3583ab15ed86ef1ff4 

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
BWG
  • BWG
  • 100% (Exalted)
  • YAF Lover Topic Starter
3 months ago
Sorry for the long delay in replying to this. I discovered your changes work if YAF is running as a top level website. However, if it is an application in IIS under a website there are still problems. On debugging I found the cause to be in YetAnotherForum.NET\Scripts\forumExtensions.js in the function

function loadChoiceOptions(params, url) {

The url parameter is passed in like this:

api/Topic/GetTopics

Therefore, if YAF is an app the api end-point is not found. As a quick work around I've just prepended the missing part of the route like this:

  if (url && !url.startsWith("/xxxxxxx")) {
    
      url = "/xxxxxxx" + url;
  }

I'm not sure if the same issues arises in other functions or whether there is a global setting which can be specified to set the route?

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
3 months ago
Which version are you using? i am confused. 
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
3 months ago
In 3.x the route is indeed wrong. This will be fixed in 3.2.9 changes are here..

https://github.com/YAFNET/YAFNET/commit/91df9d3966d60448cd4b8b7ac21a7b8c3ccd137c 

BWG
  • BWG
  • 100% (Exalted)
  • YAF Lover Topic Starter
3 months ago

In 3.x the route is indeed wrong. This will be fixed in 3.2.9 changes are here..

https://github.com/YAFNET/YAFNET/commit/91df9d3966d60448cd4b8b7ac21a7b8c3ccd137c 

Originally Posted by: tha_watcha 

Thanks.

(I'm using 3.2.7 at the moment)