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

Relationship fields > can't search for options #6238

Closed TrevorSqE closed 2 years ago

TrevorSqE commented 2 years ago

Description

In Pods 2.8, if I click in a relationship field, I'm shown a menu of options; but if I try and search by entering part of a title, it just says "No options."

Testing instructions

  1. Go to a relationship field.
  2. Click in the field.
  3. Start typing.

Expected behavior

Screenshots / screencast

Possible workaround

I can single-click and select from the drop-down menu, but this is unwieldy when there are lots of options, and client says they can't scroll down past the initially visible ones.

Pods version

2.8.1

Other super helpful information

WordPress Environment ` ### wp-core ### version: 5.8.1 site_language: en_GB user_language: en_GB timezone: Europe/London permalink: /%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: undefined environment_type: production user_count: 14 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /www/gatehoused_720/public wordpress_size: 59.40 MB (62290585 bytes) uploads_path: /www/gatehoused_720/public/wp-content/uploads uploads_size: 7.26 GB (7790434433 bytes) themes_path: /www/gatehoused_720/public/wp-content/themes themes_size: 5.53 MB (5798470 bytes) plugins_path: /www/gatehoused_720/public/wp-content/plugins plugins_size: 213.25 MB (223610814 bytes) database_size: 521.86 MB (547209216 bytes) total_size: 8.04 GB (8629343518 bytes) ### wp-dropins (1) ### advanced-cache.php: true ### wp-active-theme ### name: Gatehouse (gatehouse) version: 1.0 author: Square Eye author_website: (undefined) parent_theme: none theme_features: core-block-patterns, widgets-block-editor, custom-logo, title-tag, responsive-embeds, post-thumbnails, editor-styles, menus theme_path: /www/gatehoused_720/public/wp-content/themes/gatehouse auto_update: Disabled ### wp-themes-inactive (1) ### Twenty Twenty-One: version: 1.4, author: the WordPress team, Auto-updates disabled ### wp-mu-plugins (3) ### Kinsta Must-use Plugins: version: 2.3.4, author: Kinsta Team ManageWP - Worker Loader: author: GoDaddy, version: (undefined) WP Migrate DB Pro Compatibility: version: 1.2, author: Delicious Brains ### wp-plugins-active (35) ### Admin Columns Pro: version: 5.6.1, author: AdminColumns.com, Auto-updates disabled Admin Columns Pro - Advanced Custom Fields (ACF): version: 2.7, author: AdminColumns.com, Auto-updates disabled Admin Columns Pro - Pods: version: 1.6.1, author: AdminColumns.com, Auto-updates disabled Admin Menu Editor Pro: version: 2.16, author: Janis Elsts, Auto-updates disabled Advanced Custom Fields PRO: version: 5.10.2, author: Delicious Brains, Auto-updates disabled Breadcrumb NavXT: version: 6.6.0, author: John Havlik, Auto-updates disabled Classic Editor: version: 1.6.2, author: WordPress Contributors, Auto-updates disabled Complianz - Terms and Conditions: version: 1.0.12, author: Really Simple Plugins, Auto-updates disabled Complianz Privacy Suite (GDPR/CCPA) premium: version: 5.5.2, author: Really Simple Plugins, Auto-updates disabled Custom Twitter Feeds Pro Business: version: 1.14.1, author: Smash Balloon, Auto-updates disabled Disk Usage Sunburst: version: 1.1, author: RAIDBOXES.io, Auto-updates disabled Email Templates: version: 1.3.2.1, author: Damian Logghe, Auto-updates disabled Entry Automation for Gravity Forms: version: 4.0.2, author: ForGravity, Auto-updates enabled Google Analytics for WordPress by MonsterInsights: version: 8.1.0, author: MonsterInsights, Auto-updates enabled Gravity Forms: version: 2.5.14, author: Gravity Forms, Auto-updates disabled Intuitive Custom Post Order: version: 3.1.3, author: hijiri, Auto-updates disabled ManageWP - Worker: version: 4.9.10, author: GoDaddy, Auto-updates disabled My Web Audit: version: 1.2.1, author: My Web Audit, Auto-updates disabled Pods - Custom Content Types and Fields: version: 2.8.1, author: Pods Framework Team, Auto-updates disabled Postmark (Official): version: 1.14.0, author: Andrew Yates & Matt Gibbs, Auto-updates disabled Regenerate Thumbnails: version: 3.1.5, author: Alex Mills (Viper007Bond), Auto-updates disabled Relevanssi Premium: version: 2.16.2, author: Mikko Saari, Auto-updates disabled Simple History: version: 2.43.0, author: Pär Thernström, Auto-updates disabled Square Eye: Functions: version: 1.1, author: Square Eye, Auto-updates disabled Square Eye Lawyers: version: 2.2, author: Square Eye, Auto-updates disabled TinyPNG - JPEG, PNG & WebP image compression: version: 3.3, author: TinyPNG, Auto-updates disabled WordPress Importer: version: 0.7, author: wordpressdotorg, Auto-updates disabled WP All Import - ACF Add-On: version: 3.3.5, author: Soflyy, Auto-updates disabled WP All Import Pro: version: 4.7.0, author: Soflyy, Auto-updates disabled WP Migrate DB Pro: version: 2.2.0, author: Delicious Brains, Auto-updates disabled WP Migrate DB Pro Media Files: version: 2.1.0, author: Delicious Brains, Auto-updates disabled WP Migrate DB Pro Theme & Plugin Files: version: 1.2.0, author: Delicious Brains, Auto-updates disabled WP Offload Media: version: 2.5.6, author: Delicious Brains, Auto-updates disabled WP Rocket: version: 3.10.1, author: WP Media, Auto-updates disabled Yoast SEO: version: 17.4, author: Team Yoast, Auto-updates disabled ### wp-plugins-inactive (6) ### Accessibility Tools & Alt Text Finder: version: 1.4, author: Joseph LoPreste, StPeteDesign, Auto-updates disabled Akismet Anti-Spam: version: 4.2.1, author: Automattic, Auto-updates disabled Better Notifications for WP: version: 1.8.6, author: Made with Fuel, Auto-updates disabled Members: version: 3.1.5, author: MemberPress, Auto-updates disabled User Switching: version: 1.5.8, author: John Blackbourn & contributors, Auto-updates disabled WP Help: version: 1.7.0, author: Mark Jaquith, Auto-updates disabled ### wp-media ### image_editor: WP_Image_Editor_Imagick imagick_module_version: 1690 imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org imagick_version: 3.5.1 file_uploads: File uploads is turned off post_max_size: 128M upload_max_filesize: 128M max_effective_size: 128 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 122 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 768 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 1 imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: 2.3.0 gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: unknown ### wp-server ### server_architecture: Linux 5.8.0-1038-gcp x86_64 httpd_software: nginx/1.19.10 php_version: 7.4.23 64bit php_sapi: fpm-fcgi max_input_variables: 10000 time_limit: 300 memory_limit: 256M max_input_time: 300 upload_max_filesize: 128M php_post_max_size: 128M curl_version: 7.68.0 OpenSSL/1.1.1f suhosin: false imagick_availability: true pretty_permalinks: true ### wp-database ### extension: mysqli server_version: 10.5.10-MariaDB-1:10.5.10+maria~focal-log client_version: mysqlnd 7.4.23 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /www/gatehoused_720/public/wp-content WP_PLUGIN_DIR: /www/gatehoused_720/public/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 256M 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_LOCAL_DEV: undefined DB_CHARSET: utf8 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable ### pods ### pods-server-software: nginx/1.19.10 pods-user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36 pods-session-save-path: /var/lib/php/sessions pods-session-save-path-exists: No pods-session-save-path-writable: No pods-session-max-lifetime: 1440 pods-opcode-cache-apc: Yes pods-opcode-cache-memcached: No pods-opcode-cache-opcache: Yes pods-opcode-cache-redis: No pods-object-cache-apc: Yes pods-object-cache-apcu: Yes pods-object-cache-memcache: No pods-object-cache-memcached: No pods-object-cache-redis: Yes pods-memory-current-usage: 40.998M pods-memory-current-usage-real: 8.000M pods-network-wide: No pods-install-location: /www/gatehoused_720/public/wp-content/plugins/pods/ pods-developer: No pods-tableless-mode: No pods-relationship-table-enabled: Yes pods-light-mode: No pods-strict: No pods-allow-deprecated: Yes pods-api-cache: Yes pods-shortcode-allow-evaluate-tags: No pods-sessions: Disable sessions pods-can-use-sessions: No
Pods Package Export
TrevorSqE commented 2 years ago

Here's the JSON export of the Pods packages: https://www.dropbox.com/s/aiyfe72iidakhu8/pods-package-2021-10-25.json?dl=0.

Example of fields in question is "Practice areas" on the Video post type. I think it may be something to do with the WHERE clause we have added for this - as if I clear and save the WHERE field, it works again. So I wonder if something has changed about the way WHERE clauses need to be formatted?

sc0ttkclark commented 2 years ago

This may be fixed in 2.8.2, I'm working on getting this out first thing tomorrow morning.

kschaerer commented 2 years ago

Same report with 2.8.2

It was working fine with 2.8.1

kschaerer commented 2 years ago

Specifically the List View (with reordering) and autofill types are not working.

I tried with the Multiselect type and checkboxes and it works fine, it is only complicated because there are many records.

TrevorSqE commented 2 years ago

@sc0ttkclark, I updated to 2.8.2 and tried again - still getting "No options" when I try and search on an Autocomplete field, I'm afraid.

sc0ttkclark commented 2 years ago

I'll check this out

sc0ttkclark commented 2 years ago

Fixed via 0e1ea6a055698ed2e70227f09bce040a5def8f04

TrevorSqE commented 2 years ago

Still not working for me in 2.8.3. I'm afraid. I tested on a sandbox site with very few other plugins, and default theme. As you can see here, if I click into an Autocomplete relationship field, it shows me the options:

pods ac click

But if I type to search for an option, I don't get results:

pods ac type

Sorry!

kschaerer commented 2 years ago

Sorry to say I tried it again and it still doesn't work

JoryHogeveen commented 2 years ago

@sc0ttkclark Also got two extra users on the forums facing the same issue: https://wordpress.org/support/topic/cantt-search-by-text-on-relationship-fields-since-2-8/

Andreas2209 commented 2 years ago

Hi, i have the same issues - is there a way for me to contribute in order to help fixing it? best regards Andreas

lucasmkrolow commented 2 years ago

Same issue here. Funny thing is that it happens only in one field, the others (with similar context) are working normally. I compared all the field settings with those working but saw no difference. Everything was working before 2.8 update.

TrevorSqE commented 2 years ago

Perhaps related, but I seem to be unable to drag and drop selected items in an Auto-complete relationship field into a new sort order.

Level3Manatee commented 2 years ago

Came across this issue as well. This warning seems related: PHP Warning: in_array() expects parameter 2 to be array, string given in [...]/wp-content/plugins/pods/classes/fields/pick.php on line 2529

sc0ttkclark commented 2 years ago

@Level3Manatee Fixed the reported notice in 870edba3a04f475a9cb95c27d1cb3658e61ec2c7

@TrevorSqE Drag and drop relationship issue is tracked at https://github.com/pods-framework/pods/issues/6094

I'm digging into the remaining issue with search not working as expected when using on-page non-AJAX requests using the data given to the AsyncSelect instance in React.

sc0ttkclark commented 2 years ago

Fixed the non-AJAX searching in select via 528413b3cc282c2d57675ef54cc0b288c9c9c91f

Level3Manatee commented 2 years ago

Can confirm this fixes the issue (auto-completion as well as the warning)

kschaerer commented 2 years ago

Still not working.

El sáb., 13 de nov. de 2021 1:34 a. m., Scott Kingsley Clark < @.***> escribió:

Closed #6238 https://github.com/pods-framework/pods/issues/6238.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pods-framework/pods/issues/6238#event-5612729105, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGE463WI6ZPWB7TZEGIUIXTULXTGLANCNFSM5GVCKAPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

sc0ttkclark commented 2 years ago

@kschaerer which case isn't working? There may still be some case where it's not and I'd like to solve any remaining. What field configuration?

kschaerer commented 2 years ago

@kschaerer which case isn't working? There may still be some case where it's not and I'd like to solve any remaining. What field configuration?

Multiple List View with reordering and Multiple autofill

lucasmkrolow commented 2 years ago

@kschaerer which case isn't working? There may still be some case where it's not and I'd like to solve any remaining. What field configuration?

The issue I reported still exists on my form.

Same issue here. Funny thing is that it happens only in one field, the others (with similar context) are working normally. I compared all the field settings with those working but saw no difference. Everything was working before 2.8 update.

Level3Manatee commented 2 years ago

Odd, it works fine for me (field type 'relationship', type is a custom taxonomy, selection type 'Multiple Select', input type 'List View (with reordering)', display format 'Item 1, Item 2, and Item 3', show edit links 'yes'). REST API options are off.

This is in post edit mode in the wp backend.

kschaerer commented 2 years ago

Very interesting. I am trying to call custom post types unsuccessfully.

Karina Schaerer Copywriter - Creativa digital +595 986 907120 | @.*** | www.dibego.com http://facebook.com/karinaypunto http://instagram.com/karischga http://twitter.com/karischga

Create your own email signature https://www.wisestamp.com/create-own-signature/?utm_source=promotion&utm_medium=signature&utm_campaign=create_your_own&srcid=

[image: Mailtrack] https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11& Remitente notificado con Mailtrack https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11& 16/11/21 11:33:52 a. m.

El mar, 16 nov 2021 a las 11:00, Jan Ortgies @.***>) escribió:

Odd, it works fine for me (field type 'relationship', type is a custom taxonomy, selection type 'Multiple Select', input type 'List View (with reordering)', display format 'Item 1, Item 2, and Item 3', show edit links 'yes'). REST API options are off.

This is in post edit mode in the wp backend.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pods-framework/pods/issues/6238#issuecomment-970302442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGE463QQTQTVTAHOQI5D2VLUMJPX7ANCNFSM5GVCKAPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

Karina Schaerer Copywriter - Creativa digital +595 986 907120 <+595+986+907120> | @.*** www.dibego.com http://facebook.com/karinaypunto http://instagram.com/karischga http://twitter.com/karischga

Create your own email signature https://www.wisestamp.com/create-own-signature/?utm_source=promotion&utm_medium=signature&utm_campaign=create_your_own&srcid=

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Libre de virus. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

sc0ttkclark commented 2 years ago

I'm going to release 2.8.4 shortly and continue digging into this issue in Pods 2.8.5 as necessary. Please be sure to use the latest 2.8.4 that is on wordpress.org, that may mean you'll want to download the wordpress.org plugin zip and upload it over the existing 2.8.4 used from GitHub.

TrevorSqE commented 2 years ago

Thanks @sc0ttkclark! Upgraded to 2.8.4.1, and I am now able to search for options by typing on an Relationship (Multi-select / Autocomplete / Item 1, Item 2 and Item 3) field. Much obliged.

JoryHogeveen commented 2 years ago

Hi @TrevorSqE Thanks for letting us know! Closing topic :)

ghost commented 2 years ago

I am still facing the issue using it with Relationship / Simple custom defined list (Multiple select, Autocomplete, Item 1, Item 2, and Item 3).

P.S. It was working in the older Pods well.

sc0ttkclark commented 2 years ago

@mindeltu can you file a new bug report for your specific case?

kschaerer commented 2 years ago

Finally YES!!!!! It's working!!! Thank you!!

lucasmkrolow commented 2 years ago

I can confirm that my issue is solved, thanks a lot