Skip to content

Commit

Permalink
Fix Trash Manager infinite loading error (#16415)
Browse files Browse the repository at this point in the history
### What is he doing?
Fixes the "infinite list loading" error.


### Where did this error come from?
#16228
This change causes an error when starting the processor
"resource/trash/getlist".


### How to test
Option 1: Delete the document and go to the trash. Then clean it. There
will be an "infinite loading" of the list due to an error. Option 2: Go
to the shopping cart and click on the "Update list" icon. There will be
an "infinite loading" of the list due to an error.


### Decision
It is necessary to return the sorting so that the xPDOQuery object is
returned
  • Loading branch information
tanzirev authored Feb 27, 2024
1 parent 0b08eed commit 798fff3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/model/modx/processors/resource/trash/getlist.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public function prepareQueryBeforeCount(xPDOQuery $c)
if ($deleted = $this->getDeleted()) {
$c->where(['modResource.id:IN' => $deleted]);
} else {
return;
$c->where(['modResource.id' => 0]);
return $c;
}

if (!empty($query)) {
Expand Down

0 comments on commit 798fff3

Please sign in to comment.