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.06k stars 264 forks source link

Relationship Field improperly connecting to data taken from the database when WordPress is in multiple network mode #7181

Closed ntinhhcm closed 9 months ago

ntinhhcm commented 9 months ago

Description

In the pods/classes/fields/picks.php at line 2740

Replace

$prefix = $wpdb->base_prefix;

if ( is_multisite() && ! is_main_site() ) {
    $prefix .= get_current_blog_id() . '_';
}

with

$prefix = $wpdb->prefix;

// if ( is_multisite() && ! is_main_site() ) {
//     $prefix .= get_current_blog_id() . '_';
// }

When we want to get the list of users on the current site, the result returns the list of the original site.

Version

3.0.3

Testing Instructions

No response

Screenshots / Screencast

No response

Possible Workaround

No response

Site Health Information

No response

Pods Package

No response

sc0ttkclark commented 9 months ago

Fixed via #7185