Import from a file: ask the old site for its category and tag prefixes when the content doesn't show them
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start in app/Domain/Import/File/FileAddresses.php at bases(), which picks the prefix from content links and falls back to the WordPress defaults. Then read app/Domain/Media/Downloads/FileDownloader.php to see how the checked, pinned requests to the old site are made, and resources/js/components/import/file-plan.tsx for where the prefixes are shown. Done means that a site with no prefix-revealing links gets its prefixes from the old site's category and tag addresses, and the content links and defaults still apply as before.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens now
When an export file is read, Teme guesses the old site's category and tag prefixes (FileAddresses::bases()): it looks at the links in the content that point to the site's own categories and tags, and takes the prefix they use most. When the content has no such links, it falls back to WordPress's defaults, category and tag.
So a site that stripped the category prefix (for example with Yoast's "Remove category prefix") and whose posts never link to a category gets category prefilled. Someone who doesn't remember the old setting imports with the wrong addresses, and every old category link answers 404.
What it could do
When the old site answers (the plan page already asks it, for the media download), and the content gave no answer, ask the site itself: request one category's address with the prefix and without (/category/<slug>/ and /<slug>/), and one tag's the same way, and prefill whichever answers. The links in the content still decide when they exist; WordPress's defaults stay the last fallback. The person can still change the prefixes on the plan page, as today.
Where: app/Domain/Import/File/FileAddresses.php (bases()), app/Domain/Media/Downloads/FileDownloader.php (the checked, pinned requests to the old site), resources/js/components/import/file-plan.tsx.
Related: #696 (the same check of the old site).
- Lenguaje dominante
- PHP
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 1 h 40 min
- PR fusionados (30 d)
- 143
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una 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 temecms/teme
-
area/admin type/enhancement when/soon
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
area/media type/enhancement when/soon
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
area/admin type/bug when/soon
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
area/import type/documentation when/soon
Dificultad 2/5 Medio día Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
area/admin area/import type/bug when/later
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de temecms/teme
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
2DAW-CarlosIII/eportfolio_g5#35 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
2DAW-CarlosIII/eportfolio_g4#33 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
2DAW-CarlosIII/eportfolio_g1#34 ·
Los mantenedores suelen responder en 2 días
-
P2 Team S Type: Infrastructure
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
google/site-kit-wp#14271 ·
Los mantenedores suelen responder en 2 días
-
Display price Views field throws TypeError when the row has no productPosiblemente ocupada @albanycomputers la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
backdrop-contrib/ubercart#610 ·