pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Unable to Filter by Category Tried 2 ways #5774

Closed chafields closed 4 years ago

chafields commented 4 years ago

Describe the bug

I have read 2 articles that describe ways to filter posts by category (std taxonomy), but when I try them, neither filters any posts!

Method1: https://wordpress.org/support/topic/pods-shortcode-how-to-filter-by-category-of-built-in-taxonomies/#post-12997553 This seems the easiest, does not involve use of magic tags, and has a WHERE clause example. One problem I see in reading it is that a post could have multiple categories and the code does not show any selection method among catgories. My own posts have one category each, so perhaps that is not an issue.
The Issue is that it doesn't work. All posts are displayed.

Method2: https://docs.pods.io/displaying-pods/magic-tags/using-magic-tags/#Taxonomies Here I am on more familiar ground, having implemented a link to Users on another page. So I added to the qpm_form pod a link to category, calling it pods_category, with the intent that it is the Key category, singular, even if multiple categories are selected at the post. In this field, just one is selected. With the link added, I updated each post (three at this point) pods_category link and update the shortcode to: [pods name=qpm_form template = NewEntry where=“'{@pods_category.slug}'='risk-form'"] The categories already had slugs, so the slug name is unchanged from Method1. Again, no filtering is observed. url ..my-forms/?pods_debug_sql=1 to see the SQL, which has no mention of category or any other part of the WHERE above. This method is "brute force" compared to method1 but let's focus on getting method2 to work, please.

To Reproduce Steps to reproduce the behavior: pm me for credentials or just signup as a Contributor This membership level should have access to just one form, 'risk-form'

  1. Go to '508ebc8c43ff.ngrok.io'/my-forms/ login, then go back to the My Forms page again
  2. Click on 'My Forms' in the Menu if you end up somewhere else
  3. Scroll down to see a list of buttons. Each is a link to another site, but please ignore the links.
  4. See error: All three buttons (posts) are displayed.

Expected behavior A clear and concise description of what you expected to happen. Should be just One Button on the page.

Screenshots image image

Pods Version

Pods - Custom Content Types and Fields: 2.7.21

WordPress Environment

` ### wp-core ### version: 5.4.2 site_language: en_US user_language: en_US permalink: /%postname%/ https_status: false user_registration: 1 default_comment_status: open multisite: false user_count: 6 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: C:\Users\cfields\Local Sites\quickpmdocs\app\public wordpress_size: 39.46 MB (41373243 bytes) uploads_path: C:\Users\cfields\Local Sites\quickpmdocs\app\public/wp-content/uploads uploads_size: 29.33 MB (30750704 bytes) themes_path: C:\Users\cfields\Local Sites\quickpmdocs\app\public/wp-content/themes themes_size: 4.47 MB (4683143 bytes) plugins_path: C:\Users\cfields\Local Sites\quickpmdocs\app\public/wp-content/plugins plugins_size: 55.01 MB (57683647 bytes) database_size: 15.27 MB (16007168 bytes) total_size: 143.53 MB (150497905 bytes) ### wp-active-theme ### name: Memberlite (memberlite) version: 4.4 author: Stranger Studios author_website: https://www.strangerstudios.com parent_theme: none theme_features: menus, automatic-feed-links, title-tag, custom-logo, post-thumbnails, align-wide, html5, post-formats, custom-background, editor-color-palette, editor-style, customize-selective-refresh-widgets, custom-header, infinite-scroll, widgets theme_path: C:\Users\cfields\Local Sites\quickpmdocs\app\public/wp-content/themes/memberlite ### wp-themes-inactive (1) ### Twenty Nineteen: version: 1.5, author: the WordPress team (latest version: 1.6) ### wp-mu-plugins (1) ### Local by Flywheel Live Link Helper: version: 1.2, author: Flywheel ### wp-plugins-active (12) ### Akismet Anti-Spam: version: 4.1.6, author: Automattic Code Snippets: version: 2.14.0, author: Code Snippets Pro Duplicate Post: version: 3.2.4, author: Enrico Battocchi (latest version: 3.2.5) Health Check & Troubleshooting: version: 1.4.4, author: The WordPress.org community Paid Memberships Pro: version: 2.3.4, author: Stranger Studios Paid Memberships Pro - Custom Post Type Add On: version: .2.1, author: Paid Memberships Pro Paid Memberships Pro - Register Helper Add On: version: 1.6.1, author: Paid Memberships Pro PMPro Customizations: version: .1, author: Paid Memberships Pro Pods - Custom Content Types and Fields: version: 2.7.21, author: Pods Framework Team Ultimate Addons for Gutenberg: version: 1.16.0, author: Brainstorm Force WP AutoTerms: version: 2.4.1, author: WP AutoTerms WP Webhooks Pro: version: 3.0.3, author: Ironikus (latest version: 3.0.5) ### wp-plugins-inactive (4) ### Dashboard Widgets Suite: version: 2.5, author: Jeff Starr Paid Memberships Pro - Auto-Renewal Checkbox: version: .2.8, author: Paid Memberships Pro Paid Memberships Pro - BuddyPress Add On: version: 1.2.5, author: Paid Memberships Pro WP Webhooks: version: 2.0.5, author: Ironikus ### wp-media ### image_editor: WP_Image_Editor_GD imagick_module_version: Not available imagemagick_version: Not available gd_version: bundled (2.1.0 compatible) ghostscript_version: not available ### wp-server ### server_architecture: Windows NT 10.0 AMD64 httpd_software: nginx/1.16.0 php_version: 7.3.5 64bit php_sapi: cgi-fcgi max_input_variables: 4000 time_limit: 1200 memory_limit: 256M max_input_time: 600 upload_max_size: 300M php_post_max_size: 1000M curl_version: 7.64.0 OpenSSL/1.1.1b suhosin: false imagick_availability: false server-headers: server: nginx/1.16.0 date: Tue, 14 Jul 2020 13:38:23 GMT content-type: text/html; charset=UTF-8 vary: Accept-Encoding x-powered-by: PHP/7.3.5 pragma: no-cache expires: Wed, 11 Jan 1984 05:00:00 GMT cache-control: no-cache, must-revalidate, max-age=0 link: Array content-encoding: gzip ### wp-database ### extension: mysqli server_version: 8.0.16 client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $ ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: C:\Users\cfields\Local Sites\quickpmdocs\app\public/wp-content WP_PLUGIN_DIR: C:\Users\cfields\Local Sites\quickpmdocs\app\public/wp-content/plugins WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: true WP_DEBUG_DISPLAY: false WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable ### pods ### pods-server-software: nginx/1.16.0 pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 pods-session-save-path: undefined pods-session-save-path-exists: No pods-session-save-path-writable: No pods-session-max-lifetime: 1440 pods-opcode-cache-apc: No pods-opcode-cache-memcached: No pods-opcode-cache-opcache: Yes pods-opcode-cache-redis: No pods-object-cache-apc: No pods-object-cache-apcu: No pods-object-cache-memcache: No pods-object-cache-memcached: No pods-object-cache-redis: No pods-memory-current-usage: 9.568M pods-memory-current-usage-real: 4.000M pods-network-wide: No pods-install-location: C:\Users\cfields\Local Sites\quickpmdocs\app\public\wp-content\plugins\pods/ pods-developer: No pods-tableless-mode: No pods-light-mode: No pods-strict: Yes pods-allow-deprecated: No pods-api-cache: Yes pods-shortcode-allow-evaluate-tags: Yes `

Pods Package Export (helpful!)


Copy and Paste the JSON Export from **Pods Admin, Migrate: Packages, Export** in WordPress admin here
`{"meta":{"version":"2.7.21","build":1594734339},"pods":{"565":{"id":565,"name":"document","label":"Documents","description":"Project Documents","type":"post_type","storage":"meta","object":"","alias":"","fields":{"document_form":{"id":566,"name":"document_form","label":"Document Form","description":"Link to the document entry in Cognito Forms","help":"","class":"","type":"website","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"1","website_format":"normal","website_allow_port":"1","website_clickable":"0","website_new_window":"0","website_max_length":"255","website_html5":"0","website_placeholder":"Automatic","pick_post_status":["publish"],"admin_only":"0","restrict_role":"1","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator","editor","author","contributor"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","website_repeatable":"0"},"form_template":{"id":567,"name":"form_template","label":"Form Template","description":"Which QuickPM Form was used to create this document","help":"","class":"","type":"text","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"project":{"id":568,"name":"project","label":"Project","description":"Which project is being documented","help":"","class":"","type":"pick","weight":2,"pick_object":"post_type","pick_val":"project","sister_id":"569","required":"1","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""}},"show_in_menu":"1","label_singular":"Document","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"document","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"1","supports_thumbnail":"0","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"1","supports_comments":"1","supports_revisions":"1","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","built_in_taxonomies_wpforms_log_type":"0","menu_position":"7","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0","menu_icon":"dashicons-edit","name_admin_bar":"Project Documents","pfat_single":"NewDocument"},"570":{"id":570,"name":"qpm_form","label":"Forms","description":"Create Document","type":"post_type","storage":"meta","object":"","alias":"","fields":{"create_document":{"id":572,"name":"create_document","label":"Create Document","description":"Link to the Cognito Form, not an existing Entry, so that a new Entry is Created","help":"","class":"","type":"text","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"1","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"1","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_placeholder":"https:\/\/www.cognitoforms.com\/QuickPMDocs\/","text_repeatable":"0"},"cog_name":{"id":1079,"name":"cog_name","label":"Cognito Name","description":"Name of the Form in Cognito, suffix to url","help":"","class":"","type":"text","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"1","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"1","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"pods_category":{"id":1130,"name":"pods_category","label":"Pods Category","description":"What is the key category of this Form?","help":"","class":"","type":"pick","weight":2,"pick_object":"taxonomy","pick_val":"category","sister_id":"","required":"1","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""}},"show_in_menu":"1","label_singular":"QPM Form","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"qpm_form","capability_type_extra":"1","has_archive":"1","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"0","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","menu_position":"8","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0","menu_icon":"dashicons-plus","name_admin_bar":"Create Doc","pfat_single":"MyProjects","label_view_items":"My Forms"},"553":{"id":553,"name":"project","label":"Projects","description":"Each Project is a collection of project documents","type":"post_type","storage":"meta","object":"","alias":"","fields":{"project_information_form":{"id":555,"name":"project_information_form","label":"Edit Project Information","description":"This is the master form of the project, with information shared to all project documents","help":"","class":"","type":"website","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"1","website_format":"force-www","website_allow_port":"1","website_clickable":"0","website_new_window":"1","website_max_length":"255","website_html5":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","website_repeatable":"0","website_placeholder":""},"project_id":{"id":556,"name":"project_id","label":"Project ID","description":"Unique ID used by your organization to identify a project","help":"","class":"","type":"text","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"project_sponsor":{"id":558,"name":"project_sponsor","label":"Project Sponsor","description":"The person or organization that is paying for the project.  In short, the customer","help":"","class":"","type":"text","weight":2,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"project_manager":{"id":557,"name":"project_manager","label":"Project Manager","description":"Full name of the Project Manager","help":"","class":"","type":"text","weight":3,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"start_date":{"id":559,"name":"start_date","label":"Start Date","description":"The official starting date of the project, usually the approval date","help":"","class":"","type":"date","weight":4,"pick_object":"","pick_val":"","sister_id":"","required":"0","date_type":"format","date_format":"mdy","date_allow_empty":"1","date_html5":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","date_repeatable":"0","date_format_custom":"","date_format_custom_js":"","date_year_range_custom":""},"subproject":{"id":564,"name":"subproject","label":"SubProject","description":"A smaller part of the current project that is being managed as another project","help":"","class":"","type":"pick","weight":5,"pick_object":"post_type","pick_val":"project","sister_id":"","required":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"documents":{"id":569,"name":"documents","label":"Documents","description":"Set of documents that describe this project","help":"","class":"","type":"pick","weight":6,"pick_object":"post_type","pick_val":"document","sister_id":"568","required":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"project_creator":{"id":791,"name":"project_creator","label":"Project Creator","description":"WP User who initiated this project","help":"","class":"","type":"pick","weight":7,"pick_object":"user","pick_val":"","sister_id":"792","required":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"qpmid":{"id":1112,"name":"qpmid","label":"QPMID","description":"Unique GUID-style ID of the customer company","help":"","class":"","type":"text","weight":8,"pick_object":"","pick_val":"","sister_id":"","required":"1","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_repeatable":0,"text_placeholder":""}},"show_in_menu":"1","label_singular":"Project","public":"1","show_ui":"1","supports_title":"1","supports_editor":"0","publicly_queryable":"0","exclude_from_search":"0","capability_type":"post","capability_type_custom":"project","capability_type_extra":"1","has_archive":"1","hierarchical":"1","rewrite":"0","rewrite_with_front":"0","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"publish","supports_author":"1","supports_thumbnail":"1","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"1","supports_revisions":"1","supports_page_attributes":"1","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","menu_position":"6","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"1","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0","menu_icon":"dashicons-portfolio","label_parent":"Portfolio","label_parent_item_colon":"Portfolio","pfat_single":"MyProjects","menu_name":"Projects"},"643":{"id":643,"name":"user","label":"User","description":"","type":"user","storage":"meta","object":"user","alias":"","fields":{"projects_created":{"id":792,"name":"projects_created","label":"Projects Created","description":"Which projects I initiated","help":"","class":"","type":"pick","weight":0,"pick_object":"post_type","pick_val":"project","sister_id":"791","required":"0","pick_format_type":"multi","pick_format_single":"dropdown","pick_format_multi":"autocomplete","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"company":{"id":909,"name":"company","label":"Company","description":"Users in the same company can share projects and documents.","help":"","class":"","type":"text","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"1","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"qpmid":{"id":917,"name":"qpmid","label":"Quick PM Docs ID","description":"GUID used to assure that each company is unique.  Maps to User ID in Cognito Forms","help":"","class":"","type":"text","weight":2,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_repeatable":0,"text_placeholder":""}},"show_in_menu":1,"rest_enable":"0","read_all":"0","write_all":"0"}},"templates":{"NewEntry":{"id":1074,"name":"NewEntry","code":"<p>\r\n<a target=\"_blank\" href=\"https:\/\/www.cognitoforms.com\/QuickPMDocs\/{@cog_name, cog_user}\" rel=\"noopener noreferrer\"> \r\n\t<button>Create a New {@post_title}<\/button>\t\r\n\t<\/a> <\/p>","type":"template","slug":"newentry","options":{"_edit_lock":"1594548051:1","_edit_last":"1","admin_only":"","restrict_capability":"","capability_allowed":"","pod_reference":"a:1:{s:3:\"pod\";s:8:\"qpm_form\";}"}},"MyProjects":{"id":595,"name":"MyProjects","code":"[if post_thumbnail]\r\n<img align=\"right\" {@post_thumbnail}\r\n <br>\r\n[\/if]\r\n<p><strong>Project: \r\n\t<a style=\"padding: 0 0 0 3em;\" href={@project_information_form}> {@post_title}<\/a><\/strong> <br>\r\n\tFor {@project_sponsor}, managed by {@project_manager}, cat: {@category}<br>\r\n Created by {@project_creator.display_name} of {@project_creator.company} <br>\r\n<\/p>\r\n\r\n\r\n","type":"template","slug":"595","options":{"_edit_last":"1","admin_only":"","restrict_capability":"","capability_allowed":"","_edit_lock":"1594548427:1","pod_reference":"a:1:{s:3:\"pod\";s:7:\"project\";}"}},"NewProject":{"id":876,"name":"NewProject","code":"<a target=\"_blank\" href=\"https:\/\/www.cognitoforms.com\/QuickPMDocs\/ProjectInformation?entry={%22CompanyName%22:%22{@id,get_company}%22,%22QPMDUserID%22:%22{@id,get_QPMID}%22,%22Postauthor%22:%22{@id}%22}\" rel=\"noopener noreferrer\">  \r\n\t<button>Create a New Project<\/button>\t\r\n<\/a>\r\n","type":"template","slug":"newproject","options":{"_edit_lock":"1592531461:1","_edit_last":"1","admin_only":"","restrict_capability":"","capability_allowed":"","pod_reference":"a:1:{s:3:\"pod\";s:0:\"\";}"}},"ThisUser":{"id":724,"name":"ThisUser","code":"<p>User {@id} {@display_name} of {@company} ID={@qpmid}<\/p>","type":"template","slug":"724","options":{"_edit_last":"1","admin_only":"","restrict_capability":"","capability_allowed":"","_edit_lock":"1588624270:1","pod_reference":"a:1:{s:3:\"pod\";s:4:\"user\";}"}}}}``

**Additional context**
Add any other context about the problem here.

**Possible Workaround**
If you have discovered a workaround, please include it below.
This effort IS a workaround to Paid Memberships Pro, which I had expected to filter by category for each Membership Level.
It does not, but PMP support gave me a workaround.  The Pods shortcode is wrapped in a PM Level shortcode so that all I need in Pods is a simple category test.  The comment lines have shown me (you can see it on the screen shot above) that the level check is working properly:
[membership level="1"]
// level = Contributors
  [pods name=qpm_form template = NewEntry  where=“{@pods_category.slug}='risk-form'"]
[/membership]
[membership level="2"]
// level = PM
[pods name=qpm_form template = NewEntry]
[/membership]
issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label Type: Bug to this issue, with a confidence of 0.64. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

chafields commented 4 years ago

Ok, found the WHERE clause problem. The leading leading double-quote was not a plain quote but a special quote. Replaced it with a plain one and experimented a bit more. The working shortcode is: [pods name=qpm_form template = NewEntry where="category.slug ='risk-form'"] No need for a link to category, so removed it.