Repository navigation
[6.x] Look an entries field's entries up once in listings - #15890
Merged
jasonvarga merged 1 commit intoNov 13, 2026
Merged
Conversation
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.
An entries field in a Control Panel listing looks its entries up twice for every cell.
Entries::getItemsForPreProcessIndex()asksqueryBuilder()for a query and runs it withwhereAnyStatus(). To build that query,queryBuilder()has already run one: it finds the selected entries, moves each to the right site, and takes their ids. The second query then finds those same ids again, in the same order, with no status to filter by.The listing now uses the entries from the first lookup: once each, with any substitutes (live preview) applied, as the second query would have given them.
augment()and the query builder it returns aren't touched.Numbers
Control Panel listing requests, each in its own process, three alternating rounds of eight:
The responses are byte for byte the same.
Tests
The entries are looked up once (fails without the change). Three more pin what the listing gets and pass before and after: an entry selected twice is listed once, entries are moved to the parent's site with drafts kept, and a substituted entry is the one used.