Skip to content

Custom selector to find selectable pages not working with roles #21

@mackski

Description

@mackski

Short description of the issue

Using a custom selector to find selectable pages not working with user roles.

Expected behavior

Pages are selected and shown for field page type and saved.

Actual behavior

Pages are selected and shown for field page type, but cannot save.

Optional: Screenshots/Links that demonstrate the issue

Attempts include:
Error saving field "rider_account" - Page 1029 is not valid for rider_account (Page 1029 does not match findPagesSelector: template=user, roles.name=rider)

Error saving field "rider_account" - Page 1029 is not valid for rider_account (Page 1029 does not match findPagesSelector: template=user, roles=rider)

Optional: Suggestion for a possible fix

Work around is to use PHP custom selector:
return $pages->find("template=user, roles=rider");

Steps to reproduce the issue

  1. Add user roles
  2. Create field page type with custom selector: template=user, roles={user role}
  3. Add field to page template, and attempt to save page.

Setup/Environment

  • ProcessWire version: 3.0.34
  • (Optional) PHP version: 5.3
  • (Optional) MySQL version: 5.1.73
  • (Optional) Any 3rd party modules that are installed and could be related to the issue:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions