Closed esszett closed 1 year ago
This actually affects all queries for page references, not just roles/users, e.g.
$pages->find('mypagereffield=home|about|notavailable');
As a workaround, one can use (less performant) OR-groups.
$users->find('(roles=aaa), (roles=guest), (roles=notavailable)');
@esszett @BitPoet Thanks, I've pushed an attempted fix for this issue.
@ryancramerdesign Processwire 3.0.220 is returning the expected result now. I confirm fixed.
Short description of the issue
It seems that using the field 'roles' in selectors doesn't work exactly the same as one can see on other fields.
Expected behavior
The third example should find at least the same users as the second example.
Actual behavior
The third selector with an OR value containing an non-existing role-name leads to an empty pageArray.
Steps to reproduce the issue
Setup/Environment
SERVER DETAILS ProcessWire: 3.0.217 PHP: 8.0.28 Webserver: Apache/2.4.57 (Unix) OpenSSL/1.1.1t MySQL Server: 10.11.3-MariaDB MySQL Client: mysqlnd 8.0.28