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
merefield
(Robert)
November 19, 2023, 10:11pm
2
FWIW, I can repro this:
Go to Admin → Settings
Navigate Home
“Error, Something went wrong”.
On two recently upgraded Production installs
2 Likes
haydenjames
(Hayden James)
November 19, 2023, 10:14pm
3
Ahhh ok. Thanks for confirming. I really thought it was as usual, me messing something up!
1 Like
Yes, I can confirm it as well.
Introduced here:
discourse:main
← discourse:homepage-url-handling
opened 08:13PM - 14 Nov 23 UTC
We want / to display one of our discovery routes/controllers, but we don't want … to register it as `discovery.index` because that would break themes/plugins which check the route name. Previously, this was handled using a variety of approaches throughout the codebase (in discourse-location, discourse-url and mapping-router). But even then, it didn't work consistently. For example, if you used an Ember method like `router.transitionTo("/")`, an empty `discovery.index` page would be rendered.
This commit switches up the approach. `discovery.index` is now defined as a real route, and redirects to the desired homepage. To preserve the `/` as a 'vanity url', we patch the method on the router responsible for persisting URLs to the Ember Router and the browser. The patch identifies a relevant transition by looking for a magic query parameter.
In an ideal world, we wouldn't be patching the router at all. But at least with this commit, the workaround is all in one place, and works consistently for all navigation methods.
And error happens here:
import { homepageDestination } from "discourse/lib/homepage-router-overrides";
import { disableImplicitInjections } from "discourse/lib/implicit-injections";
import DiscourseRoute from "./discourse";
@disableImplicitInjections
export default class DiscoveryIndex extends DiscourseRoute {
@service router;
beforeModel(transition) {
const url = transition.intent.url;
const params = url.split("?", 2)[1];
let destination = homepageDestination();
if (params) {
destination += `&${params}`;
}
this.router.transitionTo(destination);
}
}
Looks like the `url` field is missing
And it seems to happen only when the urlMethod
is replaceURL
.
5 Likes
david
(David Taylor)
November 20, 2023, 3:25pm
8
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
david
(David Taylor)
Closed
November 21, 2023, 8:00am
11
This topic was automatically closed after 16 hours. New replies are no longer allowed.