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
Owner

Originally created by @Alir3z4 on GitHub (Jul 29, 2019).

  • 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

image

Originally created by @Alir3z4 on GitHub (Jul 29, 2019). - 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]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] 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 ![image](https://user-images.githubusercontent.com/591113/62052457-27529f80-b21e-11e9-853d-1c483b6eb105.png)
GiteaMirror added the type/bugissue/needs-feedback labels 2025-11-02 05:21:56 -06:00
Author
Owner

@lafriks commented on GitHub (Jul 29, 2019):

Are you using custom templates?

@lafriks commented on GitHub (Jul 29, 2019): Are you using custom templates?
Author
Owner

@techknowlogick commented on GitHub (Jul 29, 2019):

@lafriks "Also there's no custom template for repo/header file."

@techknowlogick commented on GitHub (Jul 29, 2019): @lafriks "`Also there's no custom template for repo/header file.`"
Author
Owner

@lafriks commented on GitHub (Jul 29, 2019):

@techknowlogick it is strongly not recommended but you can override any template file in Gitea

@lafriks commented on GitHub (Jul 29, 2019): @techknowlogick it is strongly not recommended but you can override any template file in Gitea
Author
Owner

@techknowlogick commented on GitHub (Jul 29, 2019):

@lafriks oh yes, I know ;) I was just quoting what the user said about not using them.

@techknowlogick commented on GitHub (Jul 29, 2019): @lafriks oh yes, I know ;) I was just quoting what the user said about not using them.
Author
Owner

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

@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.
Author
Owner

@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

@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
Author
Owner

@zeripath commented on GitHub (Jul 29, 2019):

This is very odd because there's no master branch in that upstream repository

@zeripath commented on GitHub (Jul 29, 2019): This is very odd because there's no master branch in that upstream repository
Author
Owner

@Alir3z4 commented on GitHub (Jul 29, 2019):

git can be without master branch. AFAIK, master is 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

@Alir3z4 commented on GitHub (Jul 29, 2019): git can be without `master` branch. AFAIK, `master` is 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
Author
Owner

@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): 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.
Author
Owner

@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

@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
Author
Owner

@amiga23 commented on GitHub (Sep 11, 2019):

Have the same issue.

  1. Create a branch
  2. Go to settings and set new branch as default branch
  3. delete branch
  4. try to open any folder of the repo in the gitea WebUI -> ERROR
@amiga23 commented on GitHub (Sep 11, 2019): Have the same issue. 1. Create a branch 2. Go to settings and set new branch as default branch 3. delete branch 4. try to open any folder of the repo in the gitea WebUI -> ERROR
Author
Owner

@lunny commented on GitHub (Sep 12, 2019):

@amiga23 which version of your gitea? I cannot reproduce that on 1.10.0+dev-281

@lunny commented on GitHub (Sep 12, 2019): @amiga23 which version of your gitea? I cannot reproduce that on 1.10.0+dev-281
Author
Owner

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

@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.
Author
Owner

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

@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.
Author
Owner

@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

@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
Author
Owner

@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?

@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?
Author
Owner

@Izorkin commented on GitHub (Aug 4, 2020):

A similar error occurs when viewing the history in the wiki.
Not reproduced this error. Browser error:

template: repo/header:95:151: executing "repo/header" at <EscapePound>: invalid value; expected string

Log error:

авг 04 21:47:03 web gitea[15941]: [Macaron] 2020-08-04 21:47:03: Started GET /test/example-wiki/wiki/commit/e5bd621f7b8f30fc2d7931ff75215e6deefee298 for 91.216.72.209:60137
авг 04 21:47:03 web gitea[15941]: [Macaron] 2020-08-04 21:47:03: Completed GET /test/example-wiki/wiki/commit/e5bd621f7b8f30fc2d7931ff75215e6deefee298 500 Internal Server Error in 54.093677ms
авг 04 21:47:05 web gitea[15941]: [Macaron] 2020-08-04 21:47:05: Started GET /serviceworker.js for 91.216.72.209:60137
авг 04 21:47:05 web gitea[15941]: [Macaron] [Static] Serving /serviceworker.js
авг 04 21:47:05 web gitea[15941]: [Macaron] 2020-08-04 21:47:05: Completed GET /serviceworker.js 304 Not Modified in 183.359µs

Cloning a wiki for testing on another server - error not reproducible

@Izorkin commented on GitHub (Aug 4, 2020): A similar error occurs when viewing the history in the wiki. Not reproduced this error. Browser error: ``` template: repo/header:95:151: executing "repo/header" at <EscapePound>: invalid value; expected string ``` Log error: ``` авг 04 21:47:03 web gitea[15941]: [Macaron] 2020-08-04 21:47:03: Started GET /test/example-wiki/wiki/commit/e5bd621f7b8f30fc2d7931ff75215e6deefee298 for 91.216.72.209:60137 авг 04 21:47:03 web gitea[15941]: [Macaron] 2020-08-04 21:47:03: Completed GET /test/example-wiki/wiki/commit/e5bd621f7b8f30fc2d7931ff75215e6deefee298 500 Internal Server Error in 54.093677ms авг 04 21:47:05 web gitea[15941]: [Macaron] 2020-08-04 21:47:05: Started GET /serviceworker.js for 91.216.72.209:60137 авг 04 21:47:05 web gitea[15941]: [Macaron] [Static] Serving /serviceworker.js авг 04 21:47:05 web gitea[15941]: [Macaron] 2020-08-04 21:47:05: Completed GET /serviceworker.js 304 Not Modified in 183.359µs ``` Cloning a wiki for testing on another server - error not reproducible
Author
Owner

@fashberg commented on GitHub (Sep 7, 2020):

Using latest 1.12.4 you can simply reproduce this error:

  • Create (empty) repositoy
  • add a wiki-page
  • open diff (/user/testrepo/wiki/commit/)
  • you'll get template: repo/header:95:151: executing "repo/header" at <EscapePound>: invalid value; expected string
  • if you add more changes to that wiki-page only the latest diff shows this error (top of "/user/testrepo/wiki/Home/_revision").

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.

@fashberg commented on GitHub (Sep 7, 2020): Using latest 1.12.4 you can simply reproduce this error: - Create (empty) repositoy - add a wiki-page - open diff (/user/testrepo/wiki/commit/<id>) - you'll get ```template: repo/header:95:151: executing "repo/header" at <EscapePound>: invalid value; expected string``` - if you add more changes to that wiki-page only the latest diff shows this error (top of "/user/testrepo/wiki/Home/_revision"). 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.
Author
Owner

@zeripath commented on GitHub (Oct 17, 2020):

Is this still present on 1.12.5?

@zeripath commented on GitHub (Oct 17, 2020): Is this still present on 1.12.5?
Author
Owner

@lunny commented on GitHub (Jan 2, 2021):

I will close this and please feel free reopen it if it occurs again.

@lunny commented on GitHub (Jan 2, 2021): I will close this and please feel free reopen it if it occurs again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3695