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

/en gives 404 although the home page has an English translation

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

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

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

2026年10月28日 から。

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

評価

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

調査の方向性

Start with loadPage() in system/core/pages.php, hypha_setBodyClass() in system/core/base.php, and logout() in system/core/users.php; compare how each uses the configured default page name across languages. The issue describes the expected behavior for translated home pages and the missing-translation case. Linked pull request #609 already implements a suggested fix, so review its changes and verify the reported /en and /fr behavior if taking this further.

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

説明

Impact: Medium Level: Easy Pagetype: Text Type: Bug Value: Visitors

On a site with more than one content language, the root of a second language gives 404, although the home page has a translation in that language. Search engines and visitors who go to /en (or follow a link to it) get "This page doesn't exist".

Example (default language nl, default page Start, English translation of the home page named Home):

Request Answer on main
/, /nl, /nl/Start 200, the Dutch home page
/en/Home 200, the English home page, but without the body class is_home
/en, /en/ 404
logout on a private English page redirect to /en/, so 404

Cause. loadPage() (system/core/pages.php:250-254) takes the name of the default page from the settings, which is its name in the default language (Start), and looks that name up in the requested language: hypha_getPage('en', 'Start'). The translation has its own name (Home), so nothing is found. logout() (system/core/users.php:55-60) intends to send the visitor to the home page in the current language and redirects to <language>/ when the page itself is private, which runs into the same 404. hypha_setBodyClass() (system/core/base.php:653) compares the page name with that same setting, so only the default-language version of the home page gets is_home (themes use it for the home layout), and any other page that happens to be named Start in another language gets it as well.

Evidence (PHP 8.2 container of docs/container, fictional test site):

$ curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8172/en
404
$ curl -s http://127.0.0.1:8172/en/Home | grep -o '<body[^>]*>'
<body class="Home type_textpage lang_en tag_tag4 tag_Culture">

Suggested fix. When the request has no page name, look up the default page in the default language and show its translation in the requested language when there is one (still 404 when there is none, such as /fr). Set is_home by page id. The linked pull request does that; logout then lands on the English home page without further change. Whether /en should instead redirect (301) to /en/Home belongs to the canonical-URL question of #521; /nl shows the home page without a redirect today, so the pull request does the same for /en.

Found while checking multilingual sites for SEO. Tested in the PHP 8.2 and 8.5 containers of docs/container with a fictional test site: reproduces on main (d97ab7b), gone with the linked pull request, which is offered as a suggestion and a starting point.

🤖 Generated with Claude Code

主要言語
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 を短くまとめたダイジェスト。