Reordering fails with high volume of posts and WPML
Nessuno ha ancora preso questa issue.
- #18 di @rmpel — chiusa senza merge
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Non vengono indicati file o test. Inizia riproducendo il riordinamento con un volume elevato di post e WPML, quindi traccia il percorso dell’elaborazione in batch e dell’aggiornamento di menu_order; è completato quando lo spostamento di un post a grande distanza mantiene la nuova posizione e il salvataggio non ripristina il valore.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In a situation with more posts than the batch processing does in one go and the multilingual plugin WPML, reordering fails when the new position is more than a few posts away from the original position
In our situation, the post was at menu_order 64 and needed to go to 10. I dragged the post, the menu_order reverted to 64 (no change)
when editing the post en using the menu_order meta box in the right column, change the value 64 to 10, and hit "update post", the value reverted to 64.
when editing the value directly in the database, from 64 to 10, re-opening the edit pane of the post, the value stated 10 and the post was at the correct position. When just hitting "update post" without changing any data on the edit page, the value reverted to 64.
I then proceeded to debugging the plugin, using error_log lines at specific points in the page and noticed that the reordering kept on going even after closing the browser, which made me realise; the reordering is going on still and being very slow.
I have built re-order algorithms lots of times in my long career and applied a series of database queries I thought up years ago;
multiply all order values by 2, even numbers are "current" positions
change the position of the dragged item to an odd number between the two items the item needs to go
renumber all posts starting at 1.
done.
- Lingua principale
- PHP
- Stelle
- 157
- Fork
- 24
- Merge medio
- 12m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
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 10up/simple-page-ordering
-
Add Abilities API functionalityForse già presa @phpbits l’ha presa 15 giorni fa. Apertahelp wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
10up/simple-page-ordering#311 · 1 assegnatario ·
-
help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
10up/simple-page-ordering#303 ·
-
Add plugin header and version number tests.Forse di nuovo libera @peterwilsoncc l’ha presa 56 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
10up/simple-page-ordering#292 · 1 assegnatario ·
-
Add branch check to release workflow.Forse già presa @peterwilsoncc l’ha presa 188 giorni fa. Aperta
10up/simple-page-ordering#285 · 1 assegnatario ·
-
help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
10up/simple-page-ordering#253 ·
Tutte le issue di 10up/simple-page-ordering
Issue simili
-
a11y
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
🧑💻 tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
guibranco/gstraccini-bot-service#1206 ·
I maintainer di solito rispondono entro 1 giorno
-
wpvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100