-
-
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
Template panic "StaticUrlPrefix" not defined #9320
Comments
This is because you are using 1.10 release but appear to have copied the templates from master branch. The line that error references was not added until after 1.10: You'd need to copy templates from same release you are using, so: https://github.com/go-gitea/gitea/tree/release/v1.10/templates |
Maybe we could extract template files from a gitea sub command like gitea template list
gitea template extract templates/repo/migrating Then it will load the special template file from binary embbed resources to current directory. |
If possible, we should add the URL to the right bunch of templates in the site admin page for easy reference, as well as the current |
This would be great. Then again, I'd show the proper command somewhere in the info page as an online-help. The reason is that many users use docker instances or other means of automatic installation and are not aware of .ini locations or even the path to Gitea. |
After uploading
What am I missing? |
@TensorTom if it is still that error then it is still using the templates from master branch not 1.10: You'll see the line it references only exists in the master branch: gitea/templates/repo/migrating.tmpl Line 12 in 382936a
In 1.10 it uses gitea/templates/repo/migrating.tmpl Line 12 in f11df80
It isn't clear what you've done, but it would require at least a restart of Gitea if you've replaced the original templates that were downloaded from the master branch. If not, you still have the ones from master branch in use based on that error. |
You're right. I didn't realize github doesn't zip whatever branch you're on for download. |
* DOCS: add mention of swagger api reference It's(swagger api link) mentioned vaguely in the FAQ but IMHO missing from API usage page. * Add warning to avoid template mismatches Related to #9320
I think I can close this issue since it seems resolved. Also @borisovano made a PR to add a warning notice in the docs. Thx @borisovano. |
[x]
):Description
Using the binary distribution, attempting to load templates via the
custom
directory causes error:Since the binary distro doesn't come with any template files, I cloned the repo and copied the
templates
directory to/usr/local/bin/custom
. Gitea runs fine until I copy these files tocustom
. I also tried only uploading single tmpl files that I wanted to override with similar error results.I don't need to build gitea myself in order to use templates, do I? That would be unusual as web templates go.
The text was updated successfully, but these errors were encountered: