Branch selector disappears immediately (isViewTag is not defined) #9658

Closed
opened 2025-11-02 08:45:43 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @TokisanGames on GitHub (Oct 6, 2022).

Description

The branch selector appears upon loading, then immediately disappers, just like in #19851. However there are no CSP console errors, and adding in the CSP from that issue into nginx doesn't fix the problem.

There is a different console error. This error only appears on repository pages where the branch selector should be. Other pages do not have errors.

index.js?v=1.17.2:7 
        
       ReferenceError: isViewTag is not defined
    at Bi.eval (eval at $c (index.js?v=1.17.2:21:112), <anonymous>:3:767)
    at e._render (index.js?v=1.17.2:7:164415)
    at Bi.n (index.js?v=1.17.2:7:168502)
    at Kt.get (index.js?v=1.17.2:7:171407)
    at new Kt (index.js?v=1.17.2:7:171329)
    at ne (index.js?v=1.17.2:7:168516)
    at Bi.$mount (index.js?v=1.17.2:7:214183)
    at Bi.$mount (index.js?v=1.17.2:23:651)
    at Va.e._init (index.js?v=1.17.2:7:175292)
    at new Bi (index.js?v=1.17.2:7:175984)

It works on the demo site, but that uses v1.18.

Linux binary 1.17.2 running through an Nginx proxy available under https//domain/git.

Removing all templates doesn't fix the problem.

An incognito window doesn't help.

Screenshots

Mine:

image

Expected:

image

Gitea Version

1.17.2 Linux binary

Can you reproduce the bug on the Gitea demo site?

No

Operating System

Win11/64

Browser Version

Edge 105.0.1343.53

Database

Mysql

Originally created by @TokisanGames on GitHub (Oct 6, 2022). ### Description The branch selector appears upon loading, then immediately disappers, just like in #19851. However there are no CSP console errors, and adding in the CSP from that issue into nginx doesn't fix the problem. There is a different console error. This error only appears on repository pages where the branch selector should be. Other pages do not have errors. ``` index.js?v=1.17.2:7 ReferenceError: isViewTag is not defined at Bi.eval (eval at $c (index.js?v=1.17.2:21:112), <anonymous>:3:767) at e._render (index.js?v=1.17.2:7:164415) at Bi.n (index.js?v=1.17.2:7:168502) at Kt.get (index.js?v=1.17.2:7:171407) at new Kt (index.js?v=1.17.2:7:171329) at ne (index.js?v=1.17.2:7:168516) at Bi.$mount (index.js?v=1.17.2:7:214183) at Bi.$mount (index.js?v=1.17.2:23:651) at Va.e._init (index.js?v=1.17.2:7:175292) at new Bi (index.js?v=1.17.2:7:175984) ``` It works on the demo site, but that uses v1.18. Linux binary 1.17.2 running through an Nginx proxy available under https//domain/git. Removing all templates doesn't fix the problem. An incognito window doesn't help. ### Screenshots Mine: ![image](https://user-images.githubusercontent.com/632766/194271781-fd3eea79-3857-48af-9e4a-1b0772310842.png) Expected: ![image](https://user-images.githubusercontent.com/632766/194271841-51ee4177-f638-4942-8413-bd59b29e0751.png) ### Gitea Version 1.17.2 Linux binary ### Can you reproduce the bug on the Gitea demo site? No ### Operating System Win11/64 ### Browser Version Edge 105.0.1343.53 ### Database Mysql
GiteaMirror added the issue/needs-feedback label 2025-11-02 08:45:43 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Oct 6, 2022):

A lot of users are using Gitea 1.17.x, no other has such problem, it doesn't seem to be a Gitea's problem.

Since I know nothing about your environment, I couldn't provide more helps besides:

  • Remove all your customized templates
  • Check your CDN/reserse-proxy/cache to make sure all files are served correctly
  • Take a few minutes to setup a simple Gitea instance with default and visit 127.0.0.1:3000, it should work well. Then check what are the differences from your environment.
@wxiaoguang commented on GitHub (Oct 6, 2022): A lot of users are using Gitea 1.17.x, no other has such problem, it doesn't seem to be a Gitea's problem. Since I know nothing about your environment, I couldn't provide more helps besides: * Remove all your customized templates * Check your CDN/reserse-proxy/cache to make sure all files are served correctly * Take a few minutes to setup a simple Gitea instance with default and visit 127.0.0.1:3000, it should work well. Then check what are the differences from your environment.
Author
Owner

@wxiaoguang commented on GitHub (Oct 7, 2022):

Since it doesn't seem to be a Gitea bug, I will close this issue.

Feel free to re-open if you can reproduce it with a fresh setup and confirm it's a bug, or if you would propose some solutions for the edge cases or update the documents to help to future users to get rid of similar problems.

@wxiaoguang commented on GitHub (Oct 7, 2022): Since it doesn't seem to be a Gitea bug, I will close this issue. Feel free to re-open if you can reproduce it with a fresh setup and confirm it's a bug, or if you would propose some solutions for the edge cases or update the documents to help to future users to get rid of similar problems.
Author
Owner

@TokisanGames commented on GitHub (Oct 7, 2022):

This problem was caused by static files from a previous release. Read more here: https://github.com/go-gitea/gitea/issues/21329#issuecomment-1271651894

@TokisanGames commented on GitHub (Oct 7, 2022): This problem was caused by static files from a previous release. Read more here: https://github.com/go-gitea/gitea/issues/21329#issuecomment-1271651894
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9658