We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that using the field 'roles' in selectors doesn't work exactly the same as one can see on other fields.
$s1 = "roles=aaa"; $s2 = "roles=aaa|guest"; $s3 = "roles=aaa|guest|notavailable"; echo $users->find($s1); //works, returns some users echo $users->find($s2); //works, returns some more users echo $users->find($s3); //returns empty pageArray !
$s1 = "roles=aaa"; $s2 = "roles=aaa|guest"; $s3 = "roles=aaa|guest|notavailable";
echo $users->find($s1); //works, returns some users echo $users->find($s2); //works, returns some more users echo $users->find($s3); //returns empty pageArray !
The third example should find at least the same users as the second example.
The third selector with an OR value containing an non-existing role-name leads to an empty pageArray.
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
The text was updated successfully, but these errors were encountered:
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)');
Sorry, something went wrong.
Fix issue processwire/processwire-issues#1743
e59a44a
@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.
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: