mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-14 03:46:23 -05:00
repo/header:53:150: executing "repo/header" at <EscapePound>: invalid value; expected string #3695
Closed
opened 2025-11-02 05:21:56 -06:00 by GiteaMirror
·
20 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v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-rc2
v1.3.3
v1.4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#3695
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Alir3z4 on GitHub (Jul 29, 2019).
[x]):Description
Tried to open a commit list page of a repository and got
You can visit the URL as see the issue https://gitfoo.com/Alir3z4/django-cms/commits/branch/master
Also there's no custom template for repo/header file.
...
Screenshots
@lafriks commented on GitHub (Jul 29, 2019):
Are you using custom templates?
@techknowlogick commented on GitHub (Jul 29, 2019):
@lafriks "
Also there's no custom template for repo/header file."@lafriks commented on GitHub (Jul 29, 2019):
@techknowlogick it is strongly not recommended but you can override any template file in Gitea
@techknowlogick commented on GitHub (Jul 29, 2019):
@lafriks oh yes, I know ;) I was just quoting what the user said about not using them.
@zeripath commented on GitHub (Jul 29, 2019):
There's something very odd about that repository. I've just migrated it to try and your "master" branch wasn't brought along.
How did you create this repository and the master branch?
Gitea's branches are supposed to be in refs/heads I suspect your master branch is not.
@Alir3z4 commented on GitHub (Jul 29, 2019):
Thanks @techknowlogick for pointing that out, yes @lafriks I have not overridden such template.
@zeripath I have simply migrated that repo via migration interface, the original repo is located at https://github.com/Alir3z4/django-cms which has been migrated into https://gitfoo.com/Alir3z4/django-cms/
I have found another problem as well, which it's reported at https://github.com/go-gitea/gitea/issues/7664
@zeripath commented on GitHub (Jul 29, 2019):
This is very odd because there's no master branch in that upstream repository
@Alir3z4 commented on GitHub (Jul 29, 2019):
git can be without
masterbranch. AFAIK,masteris just like any other branch, with the exception that it's created by default when creating a repo (git init)This SO thread can clarify more https://stackoverflow.com/a/3623762/636136
@zeripath commented on GitHub (Jul 29, 2019):
yeah I'm aware - but somehow your repo seems to think there should be a master branch.
I guess the default branch never got updated when the repo was migrated. Now, I think on try this doesn't happen c.f. https://try.gitea.io/arandomer/django-cms - so we must have fixed this in 1.10 but it wasn't reverted back to 1.9.
@zeripath commented on GitHub (Jul 29, 2019):
OK so a quick fix is to go to the repository settings and reset the default branch. But I don't understand why/how this appears fixed on 1.10
@amiga23 commented on GitHub (Sep 11, 2019):
Have the same issue.
@lunny commented on GitHub (Sep 12, 2019):
@amiga23 which version of your gitea? I cannot reproduce that on 1.10.0+dev-281
@stale[bot] commented on GitHub (Dec 12, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
@rdissertori commented on GitHub (Jun 23, 2020):
Hi, I can reproduce that. I'm at the current master branch of gitea runnin on docker.
What I did:
Migrate a project from github as a mirror. Initially there was a 1 "master" branch, but someone deleted it and renamed it to 1 "public" branch.
Then I'm getting that exact issue because gitea won't switch to the new "public" branch.
@DeRuiterIndustrieleAutomatisering commented on GitHub (Jul 16, 2020):
The problem occurs when you migrate a repo from github that doesn't have a master branch and then try to view a file. Gitea tries to open the master branch. When you switch to a existing branch first everything working fine
@techknowlogick commented on GitHub (Jul 16, 2020):
I've re-opened this issue. Thanks for the report.
@rdissertori / @DeRuiterIndustrieleAutomatisering are you able to replicate this on try.gitea.io?
@Izorkin commented on GitHub (Aug 4, 2020):
A similar error occurs when viewing the history in the wiki.
Not reproduced this error. Browser error:
Log error:
Cloning a wiki for testing on another server - error not reproducible
@fashberg commented on GitHub (Sep 7, 2020):
Using latest 1.12.4 you can simply reproduce this error:
template: repo/header:95:151: executing "repo/header" at <EscapePound>: invalid value; expected stringIf you push something the the repo (not the wiki-repo, the repo itself) then everying is working.
gitea source file templates/repo/header.tmpl, Line 95
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">If i build and install from latest gitea-master (1.13) this issue seems to be solved.
@zeripath commented on GitHub (Oct 17, 2020):
Is this still present on 1.12.5?
@lunny commented on GitHub (Jan 2, 2021):
I will close this and please feel free reopen it if it occurs again.