Mirror project: wrong path to images #7038

Closed
opened 2025-11-02 07:14:08 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @somera on GitHub (Mar 20, 2021).

  • Gitea version (or commit ref): 1.13.4
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite

Description

When I migrate https://github.com/cassiomolin/log-aggregation-spring-boot-elastic-stack then I get in browser

image

The problem is the brocken url path to the image:

image

Originally created by @somera on GitHub (Mar 20, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.13.4 - Git version: - Operating system: <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite ## Description When I migrate https://github.com/cassiomolin/log-aggregation-spring-boot-elastic-stack then I get in browser ![image](https://user-images.githubusercontent.com/8334250/111885267-06c4f380-89c7-11eb-902c-eeb9444cfa4f.png) The problem is the brocken url path to the image: ![image](https://user-images.githubusercontent.com/8334250/111885290-29efa300-89c7-11eb-842e-2d0e9e6d6cf1.png)
GiteaMirror added the type/bug label 2025-11-02 07:14:08 -06:00
Author
Owner

@zeripath commented on GitHub (Mar 21, 2021):

You need to tell us what the file actually links to in the markdown, what it was rendered to, what you expected, what your appurl URL and give us some indication as to how you expect us to be able to guess that this is what it should be.

We could potentially change the base URL for the render but I think we may be screwed at making this work.

@zeripath commented on GitHub (Mar 21, 2021): You need to tell us what the file actually links to in the markdown, what it was rendered to, what you expected, what your appurl URL and give us some indication as to how you expect us to be able to guess that this is what it should be. We could potentially change the base URL for the render but I think we may be screwed at making this work.
Author
Owner

@somera commented on GitHub (Mar 21, 2021):

Sorry. My gitea config

[server]
SSH_DOMAIN       = nuc-mini-celeron
DOMAIN           = nuc-mini-celeron
HTTP_PORT        = 3000
ROOT_URL         = http://nuc-mini-celeron:3000/

The URL to the image on the GitHub page looks is

https://github.com/cassiomolin/log-aggregation-spring-boot-elastic-stack/blob/master/misc/img/diagrams/elastic-stack.png

The link in my local Gitea instance is

http://nuc-mini-celeron:3000/misc/img/diagrams/elastic-stack.png

Misc is on in my Gitea an organization.

It's not bad, that the image isn't shown. But the basic authentication "sucks".

@somera commented on GitHub (Mar 21, 2021): Sorry. My gitea config ``` [server] SSH_DOMAIN = nuc-mini-celeron DOMAIN = nuc-mini-celeron HTTP_PORT = 3000 ROOT_URL = http://nuc-mini-celeron:3000/ ``` The URL to the image on the GitHub page looks is `https://github.com/cassiomolin/log-aggregation-spring-boot-elastic-stack/blob/master/misc/img/diagrams/elastic-stack.png` The link in my local Gitea instance is `http://nuc-mini-celeron:3000/misc/img/diagrams/elastic-stack.png` Misc is on in my Gitea an organization. It's not bad, that the image isn't shown. But the basic authentication "sucks".
Author
Owner

@lunny commented on GitHub (Mar 21, 2021):

markdown rendering related. /misc/img/diagrams/elastic-stack.png should be rendered as /cassiomolin/log-aggregation-spring-boot-elastic-stack/blob/master/misc/img/diagrams/elastic-stack.png.

@lunny commented on GitHub (Mar 21, 2021): markdown rendering related. `/misc/img/diagrams/elastic-stack.png` should be rendered as `/cassiomolin/log-aggregation-spring-boot-elastic-stack/blob/master/misc/img/diagrams/elastic-stack.png`.
Author
Owner

@silverwind commented on GitHub (Mar 21, 2021):

Auth popup is a separate issue where the browser hits the HTTPS endpoint meant for the git client which should never happen. If there are steps to reproduce this popup, please open a separate issue with them.

@silverwind commented on GitHub (Mar 21, 2021): Auth popup is a separate issue where the browser hits the HTTPS endpoint meant for the git client which should never happen. If there are steps to reproduce this popup, please open a separate issue with them.
Author
Owner

@zeripath commented on GitHub (Mar 21, 2021):

OK so the actual markdown that is being misrendered is:

![Elastic Stack][img.elastic-stack]

which is then linked to a reference at the bottom of the file:

  [img.elastic-stack]: /misc/img/diagrams/elastic-stack.png
@zeripath commented on GitHub (Mar 21, 2021): OK so the actual markdown that is being misrendered is: ``` ![Elastic Stack][img.elastic-stack] ``` which is then linked to a reference at the bottom of the file: ``` [img.elastic-stack]: /misc/img/diagrams/elastic-stack.png ```
Author
Owner

@zeripath commented on GitHub (Mar 21, 2021):

So it's the linked reference paths aren't being handled properly

@zeripath commented on GitHub (Mar 21, 2021): So it's the linked reference paths aren't being handled properly
Author
Owner

@zeripath commented on GitHub (Mar 21, 2021):

OK it's actually not that - it's with or without preceding slash that makes the difference.

Screenshot from 2021-03-21 15-35-47

@zeripath commented on GitHub (Mar 21, 2021): OK it's actually not that - it's with or without preceding slash that makes the difference. ![Screenshot from 2021-03-21 15-35-47](https://user-images.githubusercontent.com/1824502/111910898-2148ac80-8a5b-11eb-8dc2-b589099f89b4.png)
Author
Owner

@somera commented on GitHub (Apr 11, 2021):

Should this work in 1.14.0?

@somera commented on GitHub (Apr 11, 2021): Should this work in 1.14.0?
Author
Owner

@6543 commented on GitHub (Apr 11, 2021):

1.15.0

@6543 commented on GitHub (Apr 11, 2021): 1.15.0
Author
Owner

@somera commented on GitHub (Apr 11, 2021):

1.15.0

Thx. Cause I saw

image

But 1.15.0 is good!

@somera commented on GitHub (Apr 11, 2021): > 1.15.0 Thx. Cause I saw ![image](https://user-images.githubusercontent.com/8334250/114316436-e4288500-9b03-11eb-8120-73f71fb1c154.png) But 1.15.0 is good!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7038