YAFLogo

kheiser
  • kheiser
  • 59.2% (Neutral)
  • YAF Forumling Topic Starter YAF Version: 4
4 months ago
Ran into this issue recently:  The individual tabs in the EditUser page were displaying as 404 Not Found errors.  After digging into it a bit, I found that the tabs were pointing to the wrong place.  The problem seems to stem from the fact that the Forums are not in the root of the site, but under /Forums.  In YAFNET.Core\Utilities\JavaScriptBlocks.cs, there's some code for each tab which fetches the page information:

if (tab.innerHTML.length === 0) {
    fetch("/Admin/EditUser/UsersInfo?userId=" + editUserId, ...

I'm assuming this works fine if the forums are running out of the root, but for our site it was pointing to a page that doesn't exist.  To get this working locally, I changed it to:


                           if (tab.innerHTML.length === 0) {
                               fetch("UsersInfo?userId=" + editUserId, ...

so that it uses a relative path.  I changed it for each tab.  I think this should work regardless of where the forums are running on your site, although I've only tested it on my site.  


YAF 4.x User
Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
3 months ago
Thanks, i implemented the fix.