Skip to content
New issue

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

Multiple select relation field with Users cannot filter on roles #7009

Closed
Hexboard opened this issue Feb 11, 2023 · 2 comments
Closed

Multiple select relation field with Users cannot filter on roles #7009

Hexboard opened this issue Feb 11, 2023 · 2 comments
Assignees
Milestone

Comments

@Hexboard
Copy link

Description

In the settings of a relationship field connected to Users it is possible to restrict the query to show Users with specific roles. However on opening the pod item with this relationship field connected to multiple users I get errors like these:

Database Error; SQL: SELECT DISTINCT t.ID, t.display_name FROM wpop_users AS t LEFT JOIN wpop_pods_user AS d ON d.id = t.ID WHERE ( wpop_capabilities.meta_value LIKE "%"mentor"%" OR wpop_capabilities.meta_value LIKE "%"contactpersoon"%" OR wpop_capabilities.meta_value LIKE "%"administrator"%" ) ORDER BY t.display_name, t.ID; Response: Unknown column 'wpop_capabilities.meta_value' in 'where clause'

Database Error; SQL: SELECT DISTINCT t.ID, t.display_name FROM wpop_users AS t LEFT JOIN wpop_pods_user AS d ON d.id = t.ID WHERE ( wpop_capabilities.meta_value LIKE "%"author"%" ) ORDER BY t.display_name, t.ID LIMIT 0, 30; Response: Unknown column 'wpop_capabilities.meta_value' in 'where clause'

I user the Members plugin to create different roles and to restrict content to different roles. I cannot test this behaviour in my current website. I guess it should be tested in an empty new site.

Version

2.9.9

Testing Instructions

Create a pod with a relationship field to Users
(And create a relationship field in Pods Users to connect with this pod)
Set both to Multiple select

Screenshots / Screencast

Relationship field cannot filter on roles

Possible Workaround

Don't use the filter, and just use "auto complete" to select users in editor

Site Health Information

`
### wp-core ###

version: 6.1.1
site_language: nl_NL
user_language: nl_NL
timezone: Europe/Amsterdam
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 1
blog_public: 1
default_comment_status: closed
environment_type: production
user_count: 1748
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /var/www/qb102367/data/www/studentvoice.today
wordpress_size: 582,74 MB (611052022 bytes)
uploads_path: /var/www/qb102367/data/www/studentvoice.today/wp-content/uploads
uploads_size: 6,90 MB (7233527 bytes)
themes_path: /var/www/qb102367/data/www/studentvoice.today/wp-content/themes
themes_size: 24,92 MB (26125720 bytes)
plugins_path: /var/www/qb102367/data/www/studentvoice.today/wp-content/plugins
plugins_size: 161,29 MB (169126900 bytes)
database_size: 103,89 MB (108939340 bytes)
total_size: 879,74 MB (922477509 bytes)

### wp-dropins (1) ###

advanced-cache.php: true

### wp-active-theme ###

name: Astra-Studentvoice (astra-studentvoice)
version: 1.0.0
author: Ton van der Valk
author_website: https://studentvoice.today
parent_theme: Astra (astra)
theme_features: core-block-patterns, astra_hooks, widgets-block-editor, align-wide, automatic-feed-links, title-tag, post-thumbnails, starter-content, html5, post-formats, custom-logo, customize-selective-refresh-widgets, editor-style, woocommerce, rank-math-breadcrumbs, amp, editor-color-palette, widgets, menus
theme_path: /var/www/qb102367/data/www/studentvoice.today/wp-content/themes/astra-studentvoice
auto_update: Uitgeschakeld

### wp-parent-theme ###

name: Astra (astra)
version: 4.0.2
author: Brainstorm Force
author_website: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme
theme_path: /var/www/qb102367/data/www/studentvoice.today/wp-content/themes/astra
auto_update: Uitgeschakeld

### wp-themes-inactive (2) ###

Twenty Twenty-Three: version: 1.0, author: the WordPress team, Auto-updates uitgeschakeld
Twenty Twenty-Two: version: 1.3, author: the WordPress team, Auto-updates uitgeschakeld

### wp-mu-plugins (1) ###

Health Check Troubleshooting Mode: author: (undefined), version: 1.8.1

### wp-plugins-active (28) ###

Admin Bar Disabler: version: 1.4.2, author: Scott Kingsley Clark, Auto-updates uitgeschakeld
Akismet Anti-Spam: version: 5.0.2, author: Automattic, Auto-updates uitgeschakeld
Cache Enabler: version: 1.8.13, author: KeyCDN, Auto-updates uitgeschakeld
Caldera Forms: version: 1.9.7, author: Caldera Forms, Auto-updates uitgeschakeld
Code Snippets: version: 3.2.2, author: Code Snippets Pro, Auto-updates uitgeschakeld
Disable Admin Notices Individually: version: 1.3.2, author: Creative Motion <info@cm-wp.com>, Auto-updates uitgeschakeld
DynamicConditions: version: 1.6.0, author: RTO GmbH, Auto-updates uitgeschakeld
Elementor: version: 3.10.2, author: Elementor.com, Auto-updates ingeschakeld
Elementor Pro: version: 3.10.3, author: Elementor.com, Auto-updates uitgeschakeld
GAinWP Google Analytics Integration for WordPress: version: 5.4.6, author: IntelligenceWP, Auto-updates ingeschakeld
Gutenslider — The last WordPress slider you will ever need.: version: 5.10.1, author: eedee, Auto-updates uitgeschakeld
Health Check & Troubleshooting: version: 1.5.1, author: The WordPress.org community, Auto-updates uitgeschakeld
Insert PHP Code Snippet: version: 1.3.3, author: xyzscripts.com, Auto-updates uitgeschakeld
Loco Translate: version: 2.6.3, author: Tim Whitlock, Auto-updates uitgeschakeld
Loginizer: version: 1.7.6, author: Softaculous, Auto-updates uitgeschakeld
Loginizer Security: version: 1.7.6, author: Softaculous, Auto-updates uitgeschakeld
Members: version: 3.2.2, author: MemberPress, Auto-updates uitgeschakeld
Pods - Custom Content Types and Fields: version: 2.9.9, author: Pods Framework Team (latest version: 2.9.11.1), Auto-updates uitgeschakeld
Pods Alternative Cache: version: 2.1.5, author: Pods Framework Team, Auto-updates uitgeschakeld
Post SMTP: version: 2.3.2, author: Post SMTP, Auto-updates uitgeschakeld
Redirection: version: 5.3.9, author: John Godley, Auto-updates uitgeschakeld
User Menus: version: 1.3.1, author: Code Atlantic, Auto-updates uitgeschakeld
User Registration: version: 2.3.1, author: WPEverest, Auto-updates uitgeschakeld
User Switching: version: 1.7.0, author: John Blackbourn & contributors, Auto-updates uitgeschakeld
WP Crontrol: version: 1.15.1, author: John Blackbourn & crontributors, Auto-updates uitgeschakeld
wpDataTables: version: 5.3, author: TMS-Plugins, Auto-updates uitgeschakeld
WP Rollback: version: 1.7.3, author: GiveWP.com, Auto-updates uitgeschakeld
WP Ultimate CSV Importer - Custom Fields Import: version: 3.0, author: Smackcoders, Auto-updates uitgeschakeld

### wp-plugins-inactive (2) ###

Import Users: version: 1.3, author: Smackcoders, Auto-updates uitgeschakeld
WP Ultimate CSV Importer: version: 7.3, author: Smackcoders, Auto-updates uitgeschakeld

### code-snippets (27) ###

snippet-1: name: Example HTML shortcode, scope: global, tags: [shortcode]
snippet-2: name: Example CSS snippet, scope: front-end, tags: [css]
snippet-3: name: Example JavaScript snippet, scope: front-end, modified: 2021-05-12 16:21:52, tags: [javascript]
snippet-4: name: Order snippets by name, scope: admin, tags: [code-snippets-plugin]
snippet-6: name: pre-save bij aanmaken klas usercode en mentorid toevoegen aan user en code pod, scope: global
snippet-15: name: post-save-item-herkenbaar, scope: global, modified: 2021-09-04 11:29:23
snippet-20: name: klas post-save-item-bericht versturen na aanmaken nieuwe klas, scope: global
snippet-22: name: user pre-save bij student settings teller ophogen, scope: global, modified: 2021-08-23 10:51:19
snippet-23: name: post-save-contact-bericht versturen, scope: global, modified: 2020-05-19 17:21:10
snippet-24: name: user post-save student_toevoegen_aan_klas, scope: global, modified: 2023-02-02 16:54:45
snippet-25: name: ur_add_loginout_link, scope: global
snippet-26: name: ur_redirect_after_logout, scope: global
snippet-27: name: hide admin bar for non admins, scope: global, modified: 2020-05-20 06:56:10
snippet-28: name: Dashicons, scope: global
snippet-31: name: Gauge JavaScript snippet student + teacher visuals, scope: global, modified: 2021-12-11 13:32:14, tags: [javascript]
snippet-32: name: Order snippets by date, scope: admin, modified: 2020-01-28 17:49:47, tags: [code-snippets-plugin]
snippet-33: name: javascript voor beoordeling, scope: front-end, modified: 2022-09-28 15:38:33, tags: [javascript]
snippet-34: name: feedback snelherkenbaar 4295, scope: front-end, modified: 2022-09-10 09:26:21
snippet-35: name: feedbackfilter 4353, scope: front-end, modified: 2021-09-26 13:03:11
snippet-37: name: teacher visuals voor grotere groepen, scope: global, modified: 2022-08-27 10:49:45, tags: [javascript]
snippet-38: name: feedbackfilter 5355, scope: front-end, modified: 2022-08-07 12:08:08
snippet-39: name: Student overzicht 5421, scope: front-end, modified: 2021-11-18 23:23:04
snippet-40: name: schoolmonitor, scope: global, modified: 2022-12-04 14:26:28, tags: [javascript]
snippet-41: name: reminders instellen 1272, scope: front-end, modified: 2022-08-07 14:21:38
snippet-42: name: studentvoice_cron_reminder, scope: global, modified: 2022-10-07 14:05:57
snippet-43: name: gtag in head niet actief, scope: global, modified: 2022-10-07 10:27:13
snippet-44: name: multi klas selecteren, scope: front-end, modified: 2023-01-15 13:51:05

### wp-media ###

image_editor: WP_Image_Editor_GD
imagick_module_version: Niet beschikbaar
imagemagick_version: Niet beschikbaar
imagick_version: Niet beschikbaar
file_uploads: File uploads is turned off
post_max_size: 25M
upload_max_filesize: 25M
max_effective_size: 25 MB
max_file_uploads: 20
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: not available

### wp-server ###

server_architecture: Linux 3.10.0-1127.19.1.el7.x86_64 x86_64
httpd_software: y-wh mod_fcgid/2.3.9 PHP/5.4.16
php_version: 7.4.10 64bit
php_sapi: cgi-fcgi
max_input_variables: 1000
time_limit: 30
memory_limit: 2048M
max_input_time: 60
upload_max_filesize: 25M
php_post_max_size: 25M
curl_version: 7.29.0 NSS/3.44
suhosin: false
imagick_availability: false
pretty_permalinks: false
htaccess_extra_rules: true

### wp-database ###

extension: mysqli
server_version: 5.7.31
client_version: mysqlnd 7.4.10
max_allowed_packet: 4194304
max_connections: 151

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /var/www/qb102367/data/www/studentvoice.today/wp-content
WP_PLUGIN_DIR: /var/www/qb102367/data/www/studentvoice.today/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 2048M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: true
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Ongedefinieerd
DB_CHARSET: utf8mb4
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable

### pods ###

pods-server-software: y-wh mod_fcgid/2.3.9 PHP/5.4.16
pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
pods-session-save-path: /var/www/qb102367/data/bin-tmp/
pods-session-save-path-exists: Ja
pods-session-save-path-writable: Ja
pods-session-max-lifetime: 1440
pods-opcode-cache-apc: Nee
pods-opcode-cache-memcached: Nee
pods-opcode-cache-opcache: Nee
pods-opcode-cache-redis: Nee
pods-object-cache-apc: Nee
pods-object-cache-apcu: Nee
pods-object-cache-memcache: Nee
pods-object-cache-memcached: Nee
pods-object-cache-redis: Nee
pods-memory-current-usage: 111,236M
pods-memory-current-usage-real: 113,000M
pods-network-wide: Nee
pods-install-location: /wp-content/plugins/pods/
pods-developer: Nee
pods-tableless-mode: Nee
pods-relationship-table-enabled: Ja
pods-light-mode: Nee
pods-strict: Nee
pods-allow-deprecated: Ja
pods-api-cache: Ja
pods-shortcode-allow-evaluate-tags: Ja
pods-sessions: Disable sessions
pods-can-use-sessions: Ja
pods-relationship-table-status: 102,313

`

Pods Package

No response

@Hexboard
Copy link
Author

I can also add pods package if desired, but got an error for too long comment when I pasted the JSON

@sc0ttkclark
Copy link
Member

Fixed via e9d9681

@sc0ttkclark sc0ttkclark added this to the Pods 2.9.12 milestone Mar 6, 2023
@sc0ttkclark sc0ttkclark self-assigned this Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants