WordPress XML export: posts have no categories or tags since 5.6.6
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
The issue points to the WordPress XML export job, setup_postdata(), wxr_post_taxonomy(), and the get_terms() call, but gives no file path or test name. Start by locating those entry points and reading the export changes from 5.6.6. Done means each post retains its category, tag, and custom term assignments, with each term exported once; a linked open pull request already contains a fix.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Since 5.6.6 the "WordPress XML export" job writes every <item> without its <category domain="…"> elements. Importing the file loses all category, tag and custom term assignments of posts. On sites without custom taxonomies, all categories and tags are additionally exported a second time as <wp:term> entries.
To Reproduce
- Create a post with a category and a tag.
- Run a job with "WordPress XML export".
- Open the
.xmlfile: the post's<item>has no<category>lines. On a default install, each category and tag also appears both as<wp:category>/<wp:tag>and as<wp:term>.
Cause
5.6.6 renamed the loop variable from the global $post to $post_item and calls setup_postdata( $post_item ), which does not set the global post. wxr_post_taxonomy() uses get_post() without an argument and gets null. The duplicate terms come from get_terms() being called with an empty taxonomy list, which returns the terms of all taxonomies.
Expected behavior
Exported posts keep their terms, and each term is exported once.
System
- BackWPup 5.6.6 – 5.7.8
A fix is ready as a pull request (together with an endless-loop fix for orphaned terms and the PHP 8.2 utf8_encode() deprecation).
- Lingua principale
- PHP
- Stelle
- 96
- Fork
- 48
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di wp-media/backwpup
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
S3 backup list times are shifted by the site's UTC offset (timezone offset applied twice)Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Complete restore can leave the site half-restoredForse già presa @rafaelmaeuer l’ha presa 14 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
-
Complete restore stops after the file step: user is logged out, database is not restoredForse già presa @rafaelmaeuer l’ha presa 14 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Database restore loses data when a row is larger than max_allowed_packetForse già presa @rafaelmaeuer l’ha presa 14 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Tutte le issue di wp-media/backwpup
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 3 giorni
-
sync-en
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
[Sync EN] Formatting improvements to "Large Objects (LOBs)" docs (#6056)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertasync-en
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Перевод устарел
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
repo:cms
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
craftcms/cms#20613 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno