Clicking on issues from repository activity page uses absolute url instead of relative. #4581

Closed
opened 2025-11-02 05:55:18 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @Nhlest on GitHub (Dec 31, 2019).

  • Gitea version (or commit ref): 1.11.0+dev-530-g9600c2708
  • Git version: 2.24.1
  • Operating system: Debian
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

As you can see from the screenshot, using links on the activity page of gitea redirects me to the full URL using hostname from gitea configs, instead of it being relative using, for example, ip i am accesing gitea at the moment.

Screenshots

Look at the bottom left corner for the tooltip url after me hovering over Test issue link.
screenshot

Originally created by @Nhlest on GitHub (Dec 31, 2019). - Gitea version (or commit ref): 1.11.0+dev-530-g9600c2708 - Git version: 2.24.1 - Operating system: Debian - Database (use `[x]`): - [X] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X] No - [ ] Not relevant ## Description As you can see from the screenshot, using links on the activity page of gitea redirects me to the full URL using hostname from gitea configs, instead of it being relative using, for example, ip i am accesing gitea at the moment. ## Screenshots Look at the bottom left corner for the tooltip url after me hovering over Test issue link. ![screenshot](https://user-images.githubusercontent.com/7157355/71630603-b7f63700-2c25-11ea-9d1d-1f770e0d3a09.png)
GiteaMirror added the type/bug label 2025-11-02 05:55:18 -06:00
Author
Owner

@Nhlest commented on GitHub (Dec 31, 2019):

So i looked around and it seems like every template uses .RepoLink as a root href url everywhere except for repo/activity.tmpl which uses .Repository.HTMLURL for some reason, i guess here's an easy fix.

@Nhlest commented on GitHub (Dec 31, 2019): So i looked around and it seems like every template uses $.RepoLink as a root href url everywhere except for repo/activity.tmpl which uses $.Repository.HTMLURL for some reason, i guess here's an easy fix.
Author
Owner

@Nhlest commented on GitHub (Dec 31, 2019):

image
After applying changes in the PR above link changes to the correct one (Using local IP in my case)

@Nhlest commented on GitHub (Dec 31, 2019): ![image](https://user-images.githubusercontent.com/7157355/71631278-a4e56600-2c29-11ea-9cfd-b37d7b89f22b.png) After applying changes in the PR above link changes to the correct one (Using local IP in my case)
Author
Owner

@lunny commented on GitHub (Jan 1, 2020):

Closed by #9571

@lunny commented on GitHub (Jan 1, 2020): Closed by #9571
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4581