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

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

Abierto
#605 1 comentario 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.

  • #609 de @guidol-ive — abierto

Evaluación

Dificultad
4/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
php

Línea de trabajo

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.

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

Descripción

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

Lenguaje dominante
JavaScript
Estrellas
5
Forks
9
Merge medio
19 h 10 min
PR fusionados (30 d)
12

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.