Clicking home from admin panel results in error

AI-generated summary

Clicking home from admin panel results in error

A user, haydenjames, encountered an error when returning to the forums after clicking admin settings. The issue was also reported by merefield and Arkshine on recently upgraded production installs.

After investigation, Arkshine found the error to be introduced by a GitHub pull request (#24373) and occurring in the discourse/app/routes/discovery-index.js file. The issue happens when the urlMethod is replaceURL and the url field is missing.

A fix has been implemented by david, and users are advised to run an update via /admin/upgrade or the console to resolve the issue.

Once I click admin settings, i always get this error when returning to the forums.

EDIT: The only thing changed was moved to a new domain name. (which was successful except this error above)
Where can I find logs/cause of this error?

Edit:
I found this in inspect tool:

To test I have uninstalled all the themes (1 additional) and components (3) and removed Cloudflare (all .js is already bypassed using cache rules but just to be sure I removed it temporarily) then tested in Incognito mode. But the same result

Update:

I tested with safe mode enabled. (all 3 boxed checked) and still the same error:

Happens when clicking admin > settings and clicking home.

2 Likes

FWIW, I can repro this:

  • Go to Admin → Settings
  • Navigate Home
  • “Error, Something went wrong”.

On two recently upgraded Production installs

2 Likes

Ahhh ok. Thanks for confirming. I really thought it was as usual, me messing something up! :joy:

1 Like

You’ve found a doozy :wink:

1 Like

Yes, I can confirm it as well.

Introduced here:

https://github.com/discourse/discourse/pull/24373

And error happens here:

Looks like the `url` field is missing

And it seems to happen only when the urlMethod is replaceURL.

5 Likes

Thanks everyone - this should be fixed in tests-passed now. @haydenjames if you run an update (either via /admin/upgrade, or via the console), things should work much better.

5 Likes

This topic was automatically closed after 16 hours. New replies are no longer allowed.