-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify the error message when index.js
couldn't be loaded
#22354
Conversation
@@ -22,7 +22,7 @@ | |||
<script src='https://hcaptcha.com/1/api.js' async></script> | |||
{{end}} | |||
{{end}} | |||
<script src="{{AssetUrlPrefix}}/js/index.js?v={{AssetVersion}}" onerror="alert('Failed to load asset files from ' + this.src + ', please make sure the asset files can be accessed and the ROOT_URL setting in app.ini is correct.')"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But wasn't this the exact reason why you added this alert, especially the ROOT_URL
, in the first part?
Given that it is still often enough the reason, I think we should keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is not. See the original PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't {{AssetUrlPrefix}} built from ROOT_URL ? Or some other app.ini setting ? It would be useful to be hinted about which app.ini setting affects that url...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't {{AssetUrlPrefix}} built from ROOT_URL ?
No, not directly.
Or some other app.ini setting ?
Somewhat, but not directly. See the PR's comment: ex: https://gitea.com/gitea/helm-chart/issues/392
It would be useful to be hinted about which app.ini setting affects that url...
There are many different cases. In most cases, users could fix it by themselves. And in most cases, the problem is caused by user's environment (the example in the PR's comment). If not, it's better to collect common problems and write a FAQ.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Codecov Report
@@ Coverage Diff @@
## main #22354 +/- ##
=========================================
+ Coverage 0 48.14% +48.14%
=========================================
Files 0 1054 +1054
Lines 0 143450 +143450
=========================================
+ Hits 0 69059 +69059
- Misses 0 66117 +66117
- Partials 0 8274 +8274
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
* upstream/main: Simplify the error message when `index.js` couldn't be loaded (go-gitea#22354) Support asciicast files as new markup (go-gitea#22448) Support scoped access tokens (go-gitea#20908) some refactor about code comments (go-gitea#20821) docs: add swagger.json file location to FAQ (go-gitea#22489) docs: bump Gitea version (go-gitea#22490) chore: changelog 1.18.1 (go-gitea#22471) (go-gitea#22487) Fixed lint warnings in Grafana raised by Mixtool (go-gitea#22486) Set disable_gravatar/enable_federated_avatar when offline mode is true (go-gitea#22479) Fix pull request API field `closed_at` always being `null` (go-gitea#22482) Fix migration from gitbucket (repost) (go-gitea#22477)
In some cases, the loading failure of
index.js
is not related to the ROOT_URL directly, ex: https://gitea.com/gitea/helm-chart/issues/392If the user's reversed proxy is mis-configured:
http://public-domain/gitea/xxx
->http://gitea:3000/gitea/xxx
, it also causes the loading failure.So this PR removes the ROOT_URL related tip from the error message.