Blame table changing L# in URL to "undefined" rather than highlighting desired line #5998

Closed
opened 2025-11-02 06:42:17 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @richmahn on GitHub (Sep 14, 2020).

Description

When viewing a file in the blame page via a URL that has the desired line # to highlight, it goes to that line number but then after the file load (large file) it changes the URL argument to "undefined" and never highlights the desired line.

https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/16-NEH.usfm#L875

results in

https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/16-NEH.usfm#undefined

and then after a few seconds, it goes back to the top of the list, losing its place at line 875.

Actually going to a file with no Line # in the URL and then clicking on a line # also results in "undefined" in the URL rather than the line #:

Example:
https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/manifest.yaml
click on a line number

In a version of Gitea running v1.12.4 (our production version), it works, yet the CSS styling of the lines don't match up, so we were looking at v1.13.x development branch:

https://git.door43.org/unfoldingword/hbo_uhb/blame/branch/master/16-NEH.usfm#L875

Screenshots

Screen Shot 2020-09-14 at 2 01 33 PM

Originally created by @richmahn on GitHub (Sep 14, 2020). - Gitea version (or commit ref): 6a1a6332de5b5000d31ec26efaef6f78a4ee10f0 (master) - Git version: 2.19.0 - Operating system: N/A - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL): https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/16-NEH.usfm#L875 - [ ] No - [ ] Not relevant - Log gist: ## Description When viewing a file in the blame page via a URL that has the desired line # to highlight, it goes to that line number but then after the file load (large file) it changes the URL argument to "undefined" and never highlights the desired line. https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/16-NEH.usfm#L875 results in https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/16-NEH.usfm#undefined and then after a few seconds, it goes back to the top of the list, losing its place at line 875. Actually going to a file with no Line # in the URL and then clicking on a line # also results in "undefined" in the URL rather than the line #: Example: https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/manifest.yaml click on a line number In a version of Gitea running v1.12.4 (our production version), it works, yet the CSS styling of the lines don't match up, so we were looking at v1.13.x development branch: https://git.door43.org/unfoldingword/hbo_uhb/blame/branch/master/16-NEH.usfm#L875 ## Screenshots ![Screen Shot 2020-09-14 at 2 01 33 PM](https://user-images.githubusercontent.com/2839925/93121570-0e5fb480-f693-11ea-9530-02ca8c98b06f.png)
GiteaMirror added the type/bug label 2025-11-02 06:42:17 -06:00
Author
Owner

@6543 commented on GitHub (Sep 14, 2020):

did it ever worked on blame view?

@6543 commented on GitHub (Sep 14, 2020): did it ever worked on blame view?
Author
Owner

@richmahn commented on GitHub (Sep 14, 2020):

@6543 yes, see link to my production copy of v1.12.4 of Gitea: https://git.door43.org/unfoldingword/hbo_uhb/blame/branch/master/16-NEH.usfm#L875

Maybe bad example, as that links to a large file. Try this:
https://git.door43.org/unfoldingword/hbo_uhb/blame/branch/master/manifest.yaml#L10

@richmahn commented on GitHub (Sep 14, 2020): @6543 yes, see link to my production copy of v1.12.4 of Gitea: https://git.door43.org/unfoldingword/hbo_uhb/blame/branch/master/16-NEH.usfm#L875 Maybe bad example, as that links to a large file. Try this: https://git.door43.org/unfoldingword/hbo_uhb/blame/branch/master/manifest.yaml#L10
Author
Owner

@richmahn commented on GitHub (Sep 14, 2020):

@6543 I noticed in v1.12.4 that the line numbers didn't line up with the text (My link goes to line 875 which it properly highlights, but the numbers are all out of wack), so I tried on development branch of Gitea and the line numbers are lined up but now doesn't highlight. I'll see if I can look at this if others can't.

@richmahn commented on GitHub (Sep 14, 2020): @6543 I noticed in v1.12.4 that the line numbers didn't line up with the text (My link goes to line 875 which it properly highlights, but the numbers are all out of wack), so I tried on development branch of Gitea and the line numbers are lined up but now doesn't highlight. I'll see if I can look at this if others can't.
Author
Owner

@richmahn commented on GitHub (Sep 14, 2020):

@6543 Probably due to this huge change of removing the highlight.js script: https://github.com/go-gitea/gitea/pull/12047

@richmahn commented on GitHub (Sep 14, 2020): @6543 Probably due to this huge change of removing the highlight.js script: https://github.com/go-gitea/gitea/pull/12047
Author
Owner

@richmahn commented on GitHub (Sep 14, 2020):

@mrsdizzie Do you know if this has to do with your PR in June? Are we still allowing lines to be highlighted? So useful in showing others a problem in code.

@richmahn commented on GitHub (Sep 14, 2020): @mrsdizzie Do you know if this has to do with your PR in June? Are we still allowing lines to be highlighted? So useful in showing others a problem in code.
Author
Owner

@richmahn commented on GitHub (Sep 14, 2020):

I could be wrong. Looks like it goes back to this PR which did some work to fix the problem I was noticing in 1.12.4: https://github.com/go-gitea/gitea/pull/11885

@richmahn commented on GitHub (Sep 14, 2020): I could be wrong. Looks like it goes back to this PR which did some work to fix the problem I was noticing in 1.12.4: https://github.com/go-gitea/gitea/pull/11885
Author
Owner

@mrsdizzie commented on GitHub (Sep 14, 2020):

I'll take a look when I can but was not intentional to break or remove this feature -- could be just some is that need to be updated in template to match a js change.

@mrsdizzie commented on GitHub (Sep 14, 2020): I'll take a look when I can but was not intentional to break or remove this feature -- could be just some is that need to be updated in template to match a js change.
Author
Owner

@mrsdizzie commented on GitHub (Sep 15, 2020):

Should be fixed in linked PR -- thanks for catching!

@mrsdizzie commented on GitHub (Sep 15, 2020): Should be fixed in linked PR -- thanks for catching!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5998