johnstephens Posted February 13, 2019 Posted February 13, 2019 Hi! I created a page reference field linked to ProcessWire's "Users" page array. I do not have "create new pages" enabled for the field, and I don't want to use this field to create new users. When I am logged in as the superuser, it works as intended: I can select one or more registered users and associate them with the current page. But when I log in under a different role, the page reference field is empty, and does not allow me to select any users. I've checked the permissions for the role that I want to authorize to use the this field, and the permissions under the "Access" tab on the field itself. I don't see any role-based permissions I could add to the role that seem pertinent to this issue. Under the field's "Access" tab, I have added "View" and "Edit" privileges for the given role, but that does not seem to change the behavior at all. Can anyone offer some guidance in troubleshooting this? I know there must be some privileges I have not considered, but I don't know where to look. Thank you all in advance!
adrian Posted February 13, 2019 Posted February 13, 2019 Try adding check_access=0 to the selector. 1
johnstephens Posted February 13, 2019 Author Posted February 13, 2019 Thank you, @adrian! That seems to cause ProcessWire to choke when loading a page in the editor. If I set the selector to this: template=user, roles=managing_editor It works perfectly for a superuser. The above selector throws no error when loading the editor using my managing_editor role—it simply doesn't populate the options. But if I set the selector to this: template=user, roles=managing_editor, check_access=0 ProcessWire throws this error, no matter what role I log in with:Unknown Selector operator: '' -- was your selector value properly escaped? Thanks again! I appreciate any insight someone might offer. Cheers!
dragan Posted February 13, 2019 Posted February 13, 2019 Just a wild guess, but try to add $config->advanced = true; to your site/config.php file
Robin S Posted February 15, 2019 Posted February 15, 2019 On 2/14/2019 at 10:36 AM, johnstephens said: But if I set the selector to this: template=user, roles=managing_editor, check_access=0 ProcessWire throws this error, no matter what role I log in with This kind of selector is working for me with superuser and non-superuser roles. Did you type the "check_access=0" into the selector string by hand or did you copy/paste from @adrian's post? Because I'm seeing non-printable characters when pasting from the post: @Pete, this non-printable character issue is getting quite bad in the forums lately and can cause a lot of confusion. I don't understand how these characters are creeping into posts seeing as I'm sure nobody is entering them deliberately. Do you know if anything can be done to avoid this issue? 5
szabesz Posted February 15, 2019 Posted February 15, 2019 13 hours ago, Robin S said: copy/paste from @adrian's post? I recommend using tools like: https://www.bluem.net/en/projects/plain-clip/ (macOS, I do use it) https://stevemiller.net/puretext/ (Windows, I've just goggled it ? ) more on this: https://www.makeuseof.com/tag/5-ways-strip-formatting-copy-paste-text/ (I've just goggled it ? ) For Plain Clip.app and similar one can setup a global shortcut launching some simple custom made script – I use the commercial Keyboard Maestro but there should be free alternatives out there – so that one can easily paste clean text no matter what the source is. 2
dotnetic Posted March 19, 2019 Posted March 19, 2019 I don't think that one should need additional software, just to copy and use code from this forum. 1
ocr_b Posted March 19, 2019 Posted March 19, 2019 I have the exact same problem. I have a page ref field for user selection, and no role, but the superuser, can find users. Under »Input« I have »Users« withing the »Parent« section of »Selectable Pages«, and a »custom find« to to the special role gives no entries for the logged in user (as OP) (Roles Name Equals Reseller | @roles.name=reseller | it matches 10 pages.) Is check_access the solution for this, and how would I implement it within the page field? thx
adrian Posted March 19, 2019 Posted March 19, 2019 43 minutes ago, ocr_b said: Is check_access the solution for this, and how would I implement it within the page field? In your custom find, choose Custom (field=value) and enter check_access=0 in the far right column. 2 1
johnstephens Posted March 19, 2019 Author Posted March 19, 2019 I can confirm that this fixed the problem for me, when I typed check_access=0 by hand into the selector field instead of copying and pasting it from Adrian's message. Thank you @adrian, for identifying the solution! And thank you, @Robin S for figuring out where I went wrong! 3 1
ocr_b Posted March 20, 2019 Posted March 20, 2019 16 hours ago, adrian said: In your custom find, choose Custom (field=value) and enter check_access=0 in the far right column. SQL Error? Solved by making my own selector string. Can you also explain a bit this a bit deeper? From the docs: »Include pages that user doesn't have access to view.« — Why is the user not having access to the pages even though it has user-admin permissions? — How is it possible to give the user the rights to see the pages without check_access? Thanks! 1
johnstephens Posted March 20, 2019 Author Posted March 20, 2019 I'd like to understand this too. I too made sure that the editor role had user-admin permissions enabled, before coming across this problem.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now