gitea: repo/header:53:150: executing "repo/header" at : invalid value; expected string
- Gitea version (or commit ref): 1.9.0+rc2-16-gd789170e3 built with GNU Make 4.1, go1.12.7 : bindata, sqlite, sqlite_unlock_notify
- Git version: 2.7.4
- Operating system: Ubuntu 16.04 LTS
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
2019/07/29 13:27:33 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "passwd", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 []interface {}{1}
2019/07/29 13:27:33 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM "notification" WHERE (user_id = $1) AND (status = $2) []interface {}{1, 0x1}
2019/07/29 13:27:33 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "owner_id", "lower_name", "name", "description", "website", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "is_fork", "fork_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE "owner_id"=$1 AND "lower_name"=$2 LIMIT 1 []interface {}{1, "django-cms"}
2019/07/29 13:27:33 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "repo_id", "user_id", "mode" FROM "collaboration" WHERE "repo_id"=$1 AND "user_id"=$2 LIMIT 1 []interface {}{90, 1}
2019/07/29 13:27:33 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT "id", "repo_id", "type", "config", "created_unix" FROM "repo_unit" WHERE (repo_id = $1) []interface {}{90}
2019/07/29 13:27:33 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM "release" WHERE repo_id=$1 AND is_draft=$2 []interface {}{90, false}
2019/07/29 13:27:33 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT * FROM "user" INNER JOIN "team_user" ON "team_user".org_id="user".id INNER JOIN "team" ON "team".id="team_user".team_id WHERE ("team_user".uid=$1) AND ("team".authorize=$2) ORDER BY "user"."name" ASC []interface {}{1, 4}
2019/07/29 13:27:33 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "owner_id", "lower_name", "name", "description", "website", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "is_fork", "fork_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE (owner_id=$1 AND fork_id=$2) LIMIT 1 []interface {}{2, 90}
2019/07/29 13:27:33 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "user_id", "repo_id" FROM "watch" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 []interface {}{1, 90}
2019/07/29 13:27:33 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "uid", "repo_id" FROM "star" WHERE "uid"=$1 AND "repo_id"=$2 LIMIT 1 []interface {}{1, 90}
2019/07/29 13:27:33 ...ules/context/repo.go:638:func1() [E] RepoRef invalid repo: branch or tag not exist:
2019/07/29 13:27:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "passwd", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 []interface {}{1}
2019/07/29 13:27:35 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM "notification" WHERE (user_id = $1) AND (status = $2) []interface {}{1, 0x1}
2019/07/29 13:27:44 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT repository.* FROM "repository" INNER JOIN "user" ON "user".id = repository.owner_id WHERE (repository.lower_name = $1) AND ("user".lower_name = $2) LIMIT 1 []interface {}{"xxx", "xxxxx"}
2019/07/29 13:27:44 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "owner_id", "name", "fingerprint", "content", "mode", "type", "login_source_id", "created_unix", "updated_unix" FROM "public_key" WHERE "id"=$1 LIMIT 1 []interface {}{6}
2019/07/29 13:27:44 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "passwd", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 []interface {}{10}
2019/07/29 13:27:44 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM "public_key" WHERE "id"=$1 []interface {}{6}
2019/07/29 13:27:44 ...rm/session_update.go:375:Update() [I] [SQL] UPDATE "public_key" SET "updated_unix" = $1 WHERE "id"=$2 []interface {}{1564406864, 6}
2019/07/29 13:27:44 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "key_id", "repo_id", "name", "fingerprint", "mode", "created_unix", "updated_unix" FROM "deploy_key" WHERE "key_id"=$1 AND "repo_id"=$2 LIMIT 1 []interface {}{6, 108}
Description
Tried to open a commit list page of a repository and got
template: repo/header:53:150: executing "repo/header" at <EscapePound>: invalid value; expected string
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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (13 by maintainers)
Using latest 1.12.4 you can simply reproduce this error:
template: repo/header:95:151: executing "repo/header" at <EscapePound>: invalid value; expected string
If 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.
I will close this and please feel free reopen it if it occurs again.