fix(core): preserve manual pick order in e-picker-query-loop (0.15.3)#3
Merged
Conversation
The Posts Picker Query Loop built its WP_Query with post__in but never set orderby, so WP_Query fell back to orderby=date DESC and re-sorted the picked posts by publish date — discarding the editor's hand-picked order on the frontend. Set orderby => 'post__in' so picked posts render in the chosen order. Release prep for webentor-core 0.15.3: version bump (package.json + composer.json), CHANGELOG entry, compatibility-matrix row. Claude-Session: https://claude.ai/code/session_01EQPEj5hTGqsPPg2JCu456Q
…tent This is a public repo. Add an explicit AI Editing Rule: never name a client/consumer project, its domains, or its data in commits, PRs, changelogs, comments, or docs. Describe reported bugs generically. Claude-Session: https://claude.ai/code/session_01EQPEj5hTGqsPPg2JCu456Q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Posts Picker Query Loop (
webentor/e-picker-query-loop) ignores the order editors arrange picked posts in. Items always render in publish-date order regardless of how they are reordered in the editor.Root cause
The block stores the hand-picked order in its
postsattribute and buildsWP_Querywithpost__in, but never setorderby.WP_Querytherefore fell back to its defaultorderby => date, order => DESCand re-sorted results by publish date, discarding the chosen order on the frontend.Fix
Add
'orderby' => 'post__in'to the query args ine-picker-query-loop/data.php.post__inis always set for this block (it is a picker), so the setting is unconditional. Thewebentor/query_loop_argsfilter can still overrideorderbyper query.Verification
Picking three posts in a deliberately scrambled order (e.g.
A, C, Bwhere publish dates would sort themC, B, A):C > B > A) — picked order ignoredA > C > B) ✅Confirmed end-to-end on rendered frontend HTML with
orderby => 'post__in'applied.Release prep (0.15.3)
package.json+composer.jsonversion bump 0.15.2 → 0.15.3CHANGELOG.mdentrydocs/src/compatibility-matrix.mdrowAfter merge: push tag
core-v0.15.3to triggersplit-webentor-core.yml(mirror + Packagist ping).https://claude.ai/code/session_01EQPEj5hTGqsPPg2JCu456Q