Closed mkwia closed 2 weeks ago
Wonderful, thank you. I've changed it slightly to use ->when
as it reads better (to me).
I'm getting errors from this PR: Undefined variable $query
.
I think this should be ->when($ids, fn ($query) => $query->whereIn('id', $ids))
@clementmas thanks - fixed in v4.3.1
This PR optimises the collection query in the
updateEntryOrder
method by making use ofids
which are redundant in the current method.On some of our sites this caused a large number of jobs to be dispatched to the queue when entries were reordered in collection trees. This fix has resolved our issue when applied via composer patch.
The fix is akin to logic already in use in the
updateEntryUris
method