Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#640 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@guidol-ive がすでに取り組んでいます。

2026年10月28日 から。

  • #641 @guidol-ive による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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>.

主要言語
JavaScript
スター
5
フォーク
9
平均マージ
18時間 7分
マージ済み PR(30日)
11

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PlanBCode/hypha のほかの issue

PlanBCode/hypha の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。