Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/base/footer.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Copy link
Member

@delvh delvh Jan 6, 2023

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.

Copy link
Contributor Author

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.

Copy link
Member

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...

Copy link
Contributor Author

@wxiaoguang wxiaoguang Jan 12, 2023

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.

<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.')"></script>
{{template "custom/footer" .}}
</body>
</html>