Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Images in pages keep the address the site had at upload, so they break when the site moves

Abierto
#640 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@guidol-ive ya está trabajando en esto.

Desde el 28/10/2026.

  • #641 de @guidol-ive — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
javascript
Área
backend

Línea de trabajo

Start in system/core/pages.php at the upload/image handler, then trace how the editor stores its returned URL and how hypha_make_relative() is used. Check the linked pull request #641 for the current approach. Done means uploaded images are stored as relative images/<file> paths and continue loading after the site address changes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Component: User interface Impact: Medium Type: Bug Value: Visitors

Problem

After a site moves to another address, the images in its text pages and articles no longer show. The browser asks the old address for them, for example https://old.example.org/images/5f0c0ffee0b1a.png, while the file is in data/images of the site at the new address.

The same happens when the old address still answers but no longer serves the images (it gives a 404 or 500).

Cause

  • The image upload (upload/image in system/core/pages.php) answers with an absolute URL: $hyphaUrl . 'images/...'.
  • The editor puts that URL in the text as it is.
  • Text pages and articles do not run wikify() on save, so hypha_make_relative() never makes the URL relative.

So the stored text holds the scheme and host of the site at the time of the upload. Behind a proxy that terminates TLS, the scheme can also be wrong (see #398).

To reproduce

  1. Upload an image in a text page on http://a.example.org/.
  2. Copy the data folder to a site at http://b.example.org/, and switch off a.example.org.
  3. Open the page on b.example.org: the image points to a.example.org.

Expected

The site serves its own images, whatever address it had when they were uploaded: a relative images/<file>.

Lenguaje dominante
JavaScript
Estrellas
5
Forks
9
Merge medio
18 h 7 min
PR fusionados (30 d)
11

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PlanBCode/hypha

Todos los issues de PlanBCode/hypha

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.