Reordering fails with high volume of posts and WPML
Nobody has claimed this yet.
- #18 by @rmpel — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
No files or tests are named. Start by reproducing reordering with a high post volume and WPML, then trace the batch-processing and menu_order update path; done means moving a post a long distance preserves its new position and saving it does not revert the value.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- PHP
- Stars
- 157
- Forks
- 24
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 10up/simple-page-ordering
-
wpvc
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
10up/simple-page-ordering#314 ·
-
Add Abilities API functionalityPossibly taken @phpbits claimed this 18 days ago. Openhelp wanted
Difficulty 4/5 3-5 days Newbie friendliness 42/100
10up/simple-page-ordering#311 · 1 assignee ·
-
help wanted
Difficulty 4/5 3-5 days Newbie friendliness 48/100
10up/simple-page-ordering#303 ·
-
Add plugin header and version number tests.May be free again @peterwilsoncc claimed this 59 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
10up/simple-page-ordering#292 · 1 assignee ·
-
Add branch check to release workflow.Possibly taken @peterwilsoncc claimed this 192 days ago. Open
10up/simple-page-ordering#285 · 1 assignee ·
All issues in 10up/simple-page-ordering
Similar issues
-
wpvc
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
10up/autoshare-for-twitter#438 ·
-
wpvc
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
10up/Ad-Refresh-Control#240 ·
-
wpvc
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Backend bug severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RunningJoke/allipunkte#74 ·