pods-framework / pods-beaver-builder-themer-add-on

Integration of Beaver Themer plugin for WordPress (https://pods.io/beaver-themer/)
https://wordpress.org/plugins/pods-beaver-builder-themer-add-on/
GNU General Public License v2.0
35 stars 6 forks source link

Post Grid not displaying relationship CPTs from logged in user #88

Closed pmandiola closed 6 years ago

pmandiola commented 6 years ago

Issue Overview

When choosing a CPT from a relationship field belonging to the logged in user as the data source for a Post Grid, there are no posts displayed.

image

Expected Behavior

The Post Grid should retrieve the CPTs from the user's related field and display them.

Current Behavior

The Post Grid is always empty.

Possible Solution

Doing some debugging on the plugin's code, I can see that in pods_beaver_loop_before_query_settings, $find_params in line 305 is set to an empty array and $field_params in line 316 is set to an array with only [name] => conversations on it. Then it goes into the if in 318 but after that it doesn't go inside any of the if-elseif inside. I assume it should go into the second one in line 333, but $pod->exists() is returning nothing so it doesn't enter. That's why $ids end up empty.

Steps to Reproduce (for bugs)

  1. Add a new Post Grid
  2. Select Pod Relationship as Content Source
  3. Select Logged in User as Relationship Source
  4. Select a CPT relationship field from the user

Pods Package Export (helpful!)

pods_package_export.txt

WordPress Environment

``` Información de depuración WordPress Version: 4.9.8 PHP Version: 7.2.7 MySQL Version: 5.5.5 Server Software: Apache/2.4.33 (Win32) OpenSSL/1.1.0h PHP/7.2.7 Your User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 Session Save Path: C:\xampp\tmp Session Save Path Exists: Yes Session Save Path Writeable: Yes Session Max Lifetime: 1440 Opcode Cache: Apc: No Memcached: No OPcache: No Redis: No Object Cache: APC: No APCu: No Memcache: No Memcached: No Redis: No WPDB Prefix: wp_ WP Multisite Mode: No WP Memory Limit: 64M Pods Network-Wide Activated: No Pods Install Location: C:\apps\mentorpro-wordpress\wp-content\plugins\pods/ Pods Tableless Mode Activated: No Pods Light Mode Activated: No Currently Active Theme: Astra Child Currently Active Plugins: Beaver Builder Plugin (Standard Version): 2.1.4.4 Beaver Themer: 1.2.0.1 BuddyPress: 3.1.0 BuddyPress Notify Post Author on Blog Comment: 1.0.5 Child Theme Configurator: 2.3.0.4 Code Snippets: 2.10.1.1 Customizer Export/Import: 0.7 Force Login: 5.2 FV Player: 6.6.6 Loco Translate: 2.1.5 MB Custom Post Type: 1.8.0 Members: 2.1.0 Meta Box: 4.15.2 MontorPro Plugin: Ziggeo SDK: Ninja Forms: 3.3.13 Orbit Fox Companion: 2.5.7 Pods - Custom Content Types and Fields: 2.7.9 Pods Beaver Themer Add-On: 1.3.0 Popup Maker: 1.7.29 Widget Logic: 5.9.0 WordPress Importer: 0.6.4 WP Offload S3 Lite: 1.4.3 Ziggeo Video Posts and Comments: 1.15 ```
quasel commented 6 years ago

fixed in the 1.x Branch! You can use https://github.com/afragen/github-updater to easily test it! will release it soon