Non-ASCII source URLs move to opaque segment-<hash> slugs; WordPress supports UTF-8 slugs natively
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 56/100
Línea de trabajo
Start with php-transformer/src/Path/RouteSlug.php and its RouteSlug docblock to understand why non-ASCII segments become hashes. Trace how that result is used for post_name, permalinks, navigation links, templates, and route classes, then locate the relevant fixture tests. Done means Arabic and CJK routes retain distinct native WordPress slugs in stored post names, permalinks, and nav links while internal identities remain valid.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
RouteSlug::segment() replaces any path segment that does not fold to ASCII (Arabic, CJK, Cyrillic, Greek, Hebrew) with the opaque token segment-<sha256[:12]>. That token becomes the page's post_name, its permalink, and its template slug. Every non-Latin source URL therefore moves. A 301 keeps old links working, but the imported site's own URLs are hashes that the owner cannot read or recognize.
WordPress has no such limit: sanitize_title_with_dashes() keeps UTF-8 letters, percent-encoded through utf8_uri_encode(), so /الصور/ is a normal WordPress permalink. #3331 treated a moved source URL as a bug (underscores); this is the same class of fidelity loss, at site scale for non-Latin sites.
Evidence (mostafa-atef.com, Arabic Wix site, DLA 0.43.24, SSI 1.42.31)
- 31 of 47 imported pages have
post_namesegment-*. Titles stay correct Arabic. GET /الصور/returns301 → /segment-bfbd183ae97c/, and the nav links point at/segment-…/.- Templates are named
page-segment-6ea79cc5df8c, which is opaque in the Site Editor.
Context
The current design is deliberate (see the RouteSlug docblock): the canonical route grammar is [a-z0-9_-], so segments that WordPress would percent-encode get a derived token. The question is where that grammar needs to hold:
- Internal identities (template slugs, CSS route classes, artifact paths) can keep an ASCII token.
- The public route (
post_name, permalinks, nav hrefs) can carry WordPress's own slug for the segment, so the source URL is preserved.
Expected / acceptance
- A non-ASCII source path imports with WordPress's native slug for that path.
/الصورstays/الصور/(stored percent-encoded, as core stores it), with no redirect needed. - Template and route-class identities stay valid under their own grammars.
- Two distinct non-ASCII segments never collide.
- A fixture with an Arabic and a CJK route asserts the stored
post_name, the permalink, and the nav hrefs.
Filed by Franklin (Claude Opus via Roadie/Pi) from the mostafa-atef.com import loop. Evidence comes from the imported site's wp post list, curl, and php-transformer/src/Path/RouteSlug.php on trunk.
- Lenguaje dominante
- PHP
- Estrellas
- 31
- Forks
- 7
- Merge medio
- 7 h 50 min
- PR fusionados (30 d)
- 822
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Automattic/blocks-engine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Automattic/blocks-engine#7679 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4943 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4942 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Automattic/blocks-engine#4921 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Automattic/blocks-engine#775 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Automattic/blocks-engine
Issues similares
-
Document lexicon.default.userconfig and lexicon.default.userconfig.enforced in config.sample.phpAbiertoenhancement feature: settings good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
nextcloud/integration_openai#480 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
a11y
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
omeka/plugin-Contribution#84 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
recca0120/vscode-phpunit#620 ·
Los mantenedores suelen responder en 1 día