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 265 forks source link

Users relationship weird behaviour #5542

Closed eliodata closed 4 years ago

eliodata commented 4 years ago

Describe the bug Hi,

I’m using pods users bidirectional relationships into wp admin users profiles. It works well, but only for the 27 first users, alphabetically sorted…

If I select another user (I have more than 4000), it loads, displays well, but disappears from relation list once user is saved.

For example in my user list the 27 user is named “abbis investigation”. Everything works normally for this user and the 26 users before this one (still alphabetically sorted). If I choose the next one which is named “Abc Nîmes formation” the problem appears. Impossible to save it into relation field.

One more thing, if I disable some user roles into the pods options, I can go further into my list, to the 119 user exactly (still alphabetically sorted…).

Pods Version

2.7.16.2

WordPress Environment

` ### wp-core ### version: 5.3 site_language: fr_FR user_language: fr_FR timezone: +00:00 permalink: undefined https_status: true user_registration: 0 default_comment_status: open multisite: false user_count: 4598 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /var/www/vhosts/elledesignstudios.com/bddfs.elledesignstudios.com wordpress_size: 47,86 MB (50184772 bytes) uploads_path: /var/www/vhosts/elledesignstudios.com/bddfs.elledesignstudios.com/wp-content/uploads uploads_size: 198,25 MB (207878020 bytes) themes_path: /var/www/vhosts/elledesignstudios.com/bddfs.elledesignstudios.com/wp-content/themes themes_size: 37,19 MB (39001352 bytes) plugins_path: /var/www/vhosts/elledesignstudios.com/bddfs.elledesignstudios.com/wp-content/plugins plugins_size: 60,58 MB (63524995 bytes) database_size: 69,89 MB (73285632 bytes) total_size: 413,78 MB (433874771 bytes) ### wp-active-theme ### name: Elle Design Studios (divi-child-eds) version: 1 author: Le guide des voyageurs author_website: https://www.elledesignstudios.com parent_theme: Divi (Divi) theme_features: post-thumbnails, custom-background, automatic-feed-links, menus, title-tag, post-formats, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, customize-selective-refresh-widgets, editor-style, widgets theme_path: /var/www/vhosts/elledesignstudios.com/bddfs.elledesignstudios.com/wp-content/themes/divi-child-eds ### wp-parent-theme ### name: Divi (Divi) version: 4.0.6 author: Elegant Themes author_website: http://www.elegantthemes.com theme_path: /var/www/vhosts/elledesignstudios.com/bddfs.elledesignstudios.com/wp-content/themes/Divi ### wp-themes-inactive (4) ### Twenty Nineteen: version: 1.4, author: L’équipe WordPress Twenty Seventeen: version: 2.2, author: l’équipe WordPress Twenty Sixteen: version: 2.0, author: l'équipe WordPress Twenty Twenty: version: 1.0, author: L’équipe WordPress ### wp-mu-plugins (1) ### ManageWP - Worker Loader: author: GoDaddy, version: (undefined) ### wp-plugins-active (24) ### Admin CSS MU: version: 2.5, author: Arun Basil Lal Adminimize: version: 1.11.5, author: Frank Bültge Admin Menu Editor: version: 1.9.2, author: Janis Elsts Akismet Anti-Spam: version: 4.1.3, author: Automattic Classic Editor: version: 1.5, author: WordPress Contributors Extended CRM For Users Insights: version: 1.2.1, author: denizz Manage Notification E-mails: version: 1.5.0, author: Virgial Berveling ManageWP - Worker: version: 4.9.2, author: GoDaddy Meta Box: version: 5.2.3, author: MetaBox.io Meta Box AIO: version: 1.10.7, author: MetaBox.io My Private Site: version: 2.14.2, author: David Gewirtz Pods - Custom Content Types and Fields: version: 2.7.16.2, author: Pods Framework Team User Role Editor: version: 4.52.1, author: Vladimir Garagulya Users Insights: version: 3.8.0, author: Pexeto (latest version: 3.8.1) WooCommerce: version: 3.8.0, author: Automattic WooCommerce PayPal Checkout Gateway: version: 1.6.17, author: WooCommerce WooCommerce Stripe Gateway: version: 4.3.1, author: WooCommerce WP All Export - User Export Add-On Pro: version: 1.0.3, author: Soflyy WP All Export Pro: version: 1.5.9, author: Soflyy WP All Import - User Import Add-On Pro: version: 1.1.2, author: Soflyy WP All Import - WooCommerce Add-On Pro: version: 3.0.9, author: Soflyy WP All Import Pro: version: 4.5.8, author: Soflyy WPS Hide Login: version: 1.5.4.2, author: WPServeur, NicolasKulka, tabrisrp WP User Avatar: version: 2.2.4, author: flippercode ### wp-media ### image_editor: WP_Image_Editor_Imagick imagick_module_version: 1673 imagemagick_version: ImageMagick 6.8.9-9 Q16 x86_64 2019-10-21 http://www.imagemagick.org imagick_limits: imagick::RESOURCETYPE_AREA: 4 GB imagick::RESOURCETYPE_DISK: -1 imagick::RESOURCETYPE_FILE: 6144 imagick::RESOURCETYPE_MAP: 4 GB imagick::RESOURCETYPE_MEMORY: 2 GB imagick::RESOURCETYPE_THREAD: 1 gd_version: bundled (2.1.0 compatible) ghostscript_version: 9.26 ### wp-server ### server_architecture: Linux 4.9.0-0.bpo.9-amd64 x86_64 httpd_software: Apache php_version: 7.2.24 64bit php_sapi: fpm-fcgi max_input_variables: 1000 time_limit: 0 memory_limit: 412M max_input_time: 120 upload_max_size: 32M php_post_max_size: 32M curl_version: 7.38.0 OpenSSL/1.0.1t suhosin: false imagick_availability: true ### wp-database ### extension: mysqli server_version: 10.0.38-MariaDB-0+deb8u1 client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $ ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /var/www/vhosts/elledesignstudios.com/bddfs.elledesignstudios.com/wp-content WP_PLUGIN_DIR: /var/www/vhosts/elledesignstudios.com/bddfs.elledesignstudios.com/wp-content/plugins WP_MAX_MEMORY_LIMIT: 412M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false 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: Apache pods-user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36 pods-session-save-path: /var/lib/php5/sessions pods-session-save-path-exists: Non pods-session-save-path-writable: Non pods-session-max-lifetime: 1440 pods-opcode-cache-apc: Non pods-opcode-cache-memcached: Non pods-opcode-cache-opcache: Non pods-opcode-cache-redis: Non pods-object-cache-apc: Non pods-object-cache-apcu: Non pods-object-cache-memcache: Non pods-object-cache-memcached: Non pods-object-cache-redis: Oui pods-memory-current-usage: 33,104M pods-memory-current-usage-real: 10,000M pods-network-wide: Non pods-install-location: /var/www/vhosts/elledesignstudios.com/bddfs.elledesignstudios.com/wp-content/plugins/pods/ pods-developer: Non pods-tableless-mode: Non pods-light-mode: Non pods-strict: Non pods-allow-deprecated: Oui pods-api-cache: Oui pods-shortcode-allow-evaluate-tags: Non `

Possible Workaround Unselect all roles into the pods options.

Regards

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.96. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

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

ridinghoodmedia commented 4 years ago

My bug may be related here - @eliodata you mentioned the relationship field doesn't save, but did you verify this? In my case the field does save. The bidirectional entries are persisted in the database. The issue is they don't show up unless I change the field type to "checkbox".

ridinghoodmedia commented 4 years ago

relevant issue https://github.com/pods-framework/pods/issues/5831

sc0ttkclark commented 4 years ago

Initial review seems to point towards our limit of how many items to load before kicking into AJAX loading. That number will need to be adjusted to at minimal, the number of items currently selected for the given field, or load those items separately so they are ensured to be included on the page when loading the field up.

JoryHogeveen commented 4 years ago

@sc0ttkclark In fact, that logic was already there, just not 100% correct. PR fixes this.