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

Using magic tag {@user.ID} returns NULL if not logged in but should return 0 #6979

Closed jeiseman closed 1 year ago

jeiseman commented 1 year ago

Description

If I have a customized WHERE for the relationship options for as relationship field and it contains something like this: author.id = {@user.ID} It will result in a illegal MYSQL query when it is called for someone that is not logged in (it will have an error due to the following in the query): ... WHERE author.id = Since {@user.id} will return null instead of returning a 0. The fix for this is in includes/data.php in the function pods_v on line 676 for case 'user' it has an if statement that checks if the user is logged in. There should be an else statement that sets $output to 0.

Version

2.9.10.2

Testing Instructions

  1. Create a pod with a relationship field that points to a user pod (call the field author).
  2. In the Customized Where for this relationship field add author.id = {@user.id}
  3. Create an instance of this pod and set the relationship field to point to some user.
  4. Create a form for this pod and make the relationship field a pulldown
  5. Go to the form when you are not logged in and you should see the mysql error

Screenshots / Screencast

No response

Possible Workaround

Add the following code snippet to workaround the problem: `add_filter('pods_evaluate_tag', 'my_pod_evaluate_tag', 10, 2);

function my_pod_evaluate_tag($value, $tag ) { if ( $tag[0] == 'user' && $tag[1] == 'ID' && null === $value ) ) return 0; return $value; }`

Site Health Information

`
### wp-core ###

version: 6.1.1
site_language: en_US
user_language: en_US
timezone: America/New_York
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 2643
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /home/mafwor5/public_html
wordpress_size: loading...
uploads_path: /home/mafwor5/public_html/wp-content/uploads
uploads_size: loading...
themes_path: /home/mafwor5/public_html/wp-content/themes
themes_size: loading...
plugins_path: /home/mafwor5/public_html/wp-content/plugins
plugins_size: loading...
database_size: loading...
total_size: loading...

### wp-active-theme ###

name: GeneratePress Child (generatepress_child)
version: 0.1
author: Thomas Usborne
author_website: http://edge22.com
parent_theme: GeneratePress (generatepress)
theme_features: core-block-patterns, widgets-block-editor, menus, automatic-feed-links, post-thumbnails, post-formats, woocommerce, title-tag, html5, customize-selective-refresh-widgets, align-wide, responsive-embeds, editor-color-palette, custom-logo, editor-styles, editor-style, widgets
theme_path: /home/mafwor5/public_html/wp-content/themes/generatepress_child
auto_update: Disabled

### wp-parent-theme ###

name: GeneratePress (generatepress)
version: 3.2.4
author: Tom Usborne
author_website: https://tomusborne.com
theme_path: /home/mafwor5/public_html/wp-content/themes/generatepress
auto_update: Disabled

### wp-themes-inactive (4) ###

Twenty Twenty: version: 2.1, author: the WordPress team, Auto-updates disabled
Twenty Twenty-One: version: 1.7, author: the WordPress team, Auto-updates disabled
Twenty Twenty-Three: version: 1.0, author: the WordPress team, Auto-updates disabled
Twenty Twenty-Two: version: 1.3, author: the WordPress team, Auto-updates disabled

### wp-mu-plugins (1) ###

Code Profiler (mu-plugin): version: 1.0, author: Jerome Bruandet

### wp-plugins-active (87) ###

Admin Menu Editor Pro: version: 2.18.1, author: Janis Elsts, Auto-updates disabled
Allow Multiple Accounts: version: 3.0.4, author: Scott Reilly, Auto-updates disabled
Animated Text Block: version: 1.0.4, author: bPlugins LLC, Auto-updates disabled
Autoclear Autoptimize Cache: version: 2.1.1, author: Theme Surgeons, Auto-updates disabled
bbPress: version: 2.6.9, author: The bbPress Contributors, Auto-updates disabled
bbp style pack: version: 5.1.9, author: Robin Wilson, Auto-updates disabled
Bike Club: version: 0.1, author: Jonathan Eiseman, Auto-updates disabled
Block Visibility: version: 2.5.0, author: Nick Diego, Auto-updates disabled
BuddyPress: version: 10.6.0, author: The BuddyPress Community, Auto-updates disabled
BuddyPress Activity ShortCode: version: 1.1.8, author: BuddyDev, Auto-updates disabled
BuddyPress Group Email Subscription: version: 4.0.4, author: Deryk Wenaus, boonebgorges, r-a-y, Auto-updates disabled
Code Profiler Pro: version: 1.5.2, author: Jerome Bruandet ~ NinTechNet Ltd., Auto-updates disabled
DCO Comment Attachment: version: 2.4.0, author: Denis Yanchevskiy, Auto-updates disabled
Ditty: version: 3.0.31, author: Metaphor Creations, Auto-updates disabled
Duplicate Menu: version: 0.2.2, author: Jonathan Christopher, Auto-updates disabled
Duplicator Pro: version: 4.5.9, author: Snap Creek, Auto-updates disabled
Dynamic User Directory: version: 1.6.7, author: Sarah Giles, Auto-updates disabled
Dynamic User Directory Meta Fields Search: version: 3.3, author: Sarah Giles, Auto-updates disabled
Easy Updates Manager: version: 9.0.14, author: Easy Updates Manager Team, Auto-updates disabled
Essential Blocks: version: 3.8.5, author: WPDeveloper, Auto-updates disabled
Events Manager: version: 6.1.6, author: Pixelite, Auto-updates disabled
Featured Image Custom Link: version: 1.1.0, author: Viitorcloud, Mitali, Auto-updates disabled
FileBird: version: 5.1.1, author: Ninja Team, Auto-updates disabled
Fix Image Rotation: version: 2.2.2, author: Gagan Deep Singh, Auto-updates disabled
Footnotes Made Easy: version: 1.0.2, author: David Artiss, Auto-updates disabled
GD Mail Queue: version: 3.9.3, author: Milan Petrovic, Auto-updates disabled
GenerateBlocks: version: 1.6.0, author: Tom Usborne, Auto-updates disabled
GP Premium: version: 2.2.2, author: Tom Usborne, Auto-updates disabled
Gravity Forms: version: 2.6.8, author: Gravity Forms, Auto-updates disabled
Gravity Forms Gutenberg Add-On: version: 1.0-rc-1.4, author: rocketgenius, Auto-updates disabled
Gravity Forms Polls Add-On: version: 3.9, author: Gravity Forms, Auto-updates disabled
Gravity Forms Reset Button Add-On: version: 1.0, author: Able Engine & William Wilkerson, Auto-updates disabled
Gravity Forms Signature Add-On: version: 4.3, author: Gravity Forms, Auto-updates disabled
Gravity Forms Survey Add-On: version: 3.7, author: Gravity Forms, Auto-updates disabled
Image Hover Effects Block: version: 1.4.5, author: Blocksera, Auto-updates disabled
Image Upload for BBPress: version: 1.1.18, author: WP Zone, Auto-updates disabled
Jetpack: version: 11.6, author: Automattic, Auto-updates disabled
LH Buddypress Export Xprofile Data: version: 2.00, author: Peter Shaw, Auto-updates disabled
Loco Translate: version: 2.6.3, author: Tim Whitlock, Auto-updates disabled
MediaPress: version: 1.5.3, author: BuddyDev, Auto-updates disabled
Media Sync: version: 1.2.9, author: Erol Živina, Auto-updates disabled
Members: version: 3.2.2, author: MemberPress, Auto-updates disabled
Multiple Columns for Gravity Forms: version: 4.0.6, author: WebHolism, Auto-updates disabled
Nginx Helper: version: 2.2.2, author: rtCamp, Auto-updates disabled
OWM Weather: version: 5.6.12, author: Uwe Jacobs, Auto-updates disabled
Paid Memberships Pro: version: 2.9.8, author: Paid Memberships Pro, Auto-updates disabled
Paid Memberships Pro - Add Member From Admin: version: 0.7.1, author: Stranger Studios, Auto-updates disabled
Paid Memberships Pro - Add PayPal Express Add On: version: .6, author: Paid Memberships Pro, Auto-updates disabled
Paid Memberships Pro - BuddyPress & BuddyBoss Add On: version: 1.3.1, author: Paid Memberships Pro, Auto-updates disabled
Paid Memberships Pro - Developer's Toolkit Add On: version: 0.7, author: Paid Memberships Pro, Auto-updates disabled
Paid Memberships Pro - Group Discount Codes Add On: version: .3.2, author: Paid Memberships Pro, Auto-updates disabled
Paid Memberships Pro - Membership Manager Role Add On: version: .3.2, author: Stranger Studios, Auto-updates disabled
Paid Memberships Pro - Pay by Check Add On: version: 0.11, author: Stranger Studios, Auto-updates disabled
Paid Memberships Pro - Register Helper Add On: version: 1.8, author: Paid Memberships Pro, Auto-updates disabled
Paid Memberships Pro - Sponsored Members Add On: version: 0.10, author: Paid Memberships Pro, Auto-updates disabled
PDF Embedder Premium: version: 5.0.2, author: PDF Embedder Team, Auto-updates disabled
Pods - Custom Content Types and Fields: version: 2.9.10.2, author: Pods Framework Team, Auto-updates disabled
Pods Alternative Cache: version: 2.1.5, author: Pods Framework Team, Auto-updates disabled
Pods Gravity Forms Add-On: version: 1.4.5, author: Pods Framework Team, Auto-updates disabled
Popup Maker: version: 1.17.1, author: Popup Maker, Auto-updates disabled
Post Type Switcher: version: 3.2.1, author: Triple J Software, Inc., Auto-updates disabled
PublishPress Blocks: version: 3.1.1, author: PublishPress, Auto-updates disabled
Redirection: version: 5.3.6, author: John Godley, Auto-updates disabled
Register Helper Example: version: .2, author: Stranger Studios, Auto-updates disabled
Remove Dashboard Access: version: 1.1.5, author: TrustedLogin, Auto-updates disabled
Resize Image After Upload: version: 1.8.6, author: ShortPixel, Auto-updates disabled
Simple Iframe: version: 1.1.1, author: Jorge González, Auto-updates disabled
Simple Lightbox: version: 2.9.3, author: Archetyped, Auto-updates disabled
Spectra: version: 2.2.0, author: Brainstorm Force, Auto-updates disabled
Subscribe to Comments Reloaded: version: 220725, author: WPKube, Auto-updates disabled
The Events Calendar: version: 6.0.5, author: The Events Calendar, Auto-updates disabled
The Events Calendar Extension: Event Titles Link to Website URL: version: 1.2.0, author: Modern Tribe, Inc., Auto-updates disabled
The Events Calendar Extension: Remove Export Links: version: 1.0.0, author: Modern Tribe, Inc., Auto-updates disabled
The Events Calendar PRO: version: 6.0.5.1, author: The Events Calendar, Auto-updates disabled
The Icon Block: version: 1.3.2, author: Nick Diego, Auto-updates disabled
UpdraftPlus - Backup/Restore: version: 2.22.25.26, author: UpdraftPlus.Com, DavidAnderson, Auto-updates disabled
User Menus: version: 1.3.1, author: Code Atlantic, Auto-updates disabled
User Switching: version: 1.7.0, author: John Blackbourn & contributors, Auto-updates disabled
Wbcom Designs - BuddyPress Activity Filter: version: 2.8.3, author: Wbcom Designs<admin@wbcomdesigns.com>, Auto-updates disabled
Wordfence Security: version: 7.8.2, author: Wordfence, Auto-updates disabled
WP-Optimize - Clean, Compress, Cache: version: 3.2.10, author: David Anderson, Ruhani Rabin, Team Updraft, Auto-updates disabled
WP Crontrol: version: 1.15.0, author: John Blackbourn & crontributors, Auto-updates disabled
WP File Manager: version: 7.1.7, author: mndpsingh287, Auto-updates disabled
WP File Manager - PRO: version: 8.3.2, author: mndpsingh287, Auto-updates disabled
WP SMS: version: 5.9.1, author: VeronaLabs, Auto-updates disabled
Yoast Duplicate Post: version: 4.5, author: Enrico Battocchi & Team Yoast, Auto-updates disabled
Yoast SEO: version: 19.13, author: Team Yoast, Auto-updates disabled

### wp-plugins-inactive (23) ###

Advanced Editor Tools (previously TinyMCE Advanced): version: 5.6.0, author: Automattic, Auto-updates disabled
Autoptimize: version: 3.1.4, author: Frank Goossens (futtta), Auto-updates disabled
Better Search: version: 3.1.0, author: Ajay D'Souza, Auto-updates disabled
ClubRideSchedule: version: 0.0.1, author: Jon Eiseman, Auto-updates disabled
Code Profiler: version: 1.5.2, author: Jerome Bruandet ~ NinTechNet Ltd., Auto-updates disabled
Disable Emails: version: 1.8.1, author: WebAware, Auto-updates disabled
DynamicConditions: version: 1.6.0, author: RTO GmbH, Auto-updates disabled
FileBird Lite: version: 5.1, author: Ninja Team, Auto-updates disabled
Lock User Account: version: 1.0.3, author: teknigar, Auto-updates disabled
Log Emails: version: 1.4.0, author: WebAware, Auto-updates disabled
Lordicon Animated Icons: version: 2.0.1, author: Lordicon, Auto-updates disabled
Mail logging - WP Mail Catcher: version: 2.0.5, author: James Ward, Auto-updates disabled
Menu Icons: version: 0.13.2, author: ThemeIsle, Auto-updates disabled
Newsletter: version: 7.5.9, author: Stefano Lissa & The Newsletter Team, Auto-updates disabled
Paid Memberships Pro - Gift Levels Add On: version: 1.0.2, author: Stranger Studios, Auto-updates disabled
Query Monitor: version: 3.10.1, author: John Blackbourn, Auto-updates disabled
SMTP2GO - Email Made Easy: version: 1.4.2, author: SMTP2GO, Auto-updates disabled
The Events Calendar - Shortcode And Templates Pro: version: 2.3, author: Cool Plugins, Auto-updates disabled
Tumult Hype Animations: author: (undefined), version: 1.9.7, Auto-updates disabled
WP Activity Log: version: 4.4.3, author: WP White Security, Auto-updates disabled
WP Activity Log for Gravity Forms: version: 1.2.2, author: WP White Security, Auto-updates disabled
WP Mail SMTP: version: 3.7.0, author: WPForms, Auto-updates disabled
WP Media File Type Manager: version: 2.2.1, author: Seerox, Auto-updates disabled

### wp-media ###

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1690
imagemagick_version: ImageMagick 6.9.10-68 Q16 x86_64 2021-10-14 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: File uploads is turned off
post_max_size: 550M
upload_max_filesize: 512M
max_effective_size: 512 MB
max_file_uploads: 20
imagick_limits: 
    imagick::RESOURCETYPE_AREA: 8 GB
    imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
    imagick::RESOURCETYPE_FILE: 786432
    imagick::RESOURCETYPE_MAP: 8 GB
    imagick::RESOURCETYPE_MEMORY: 4 GB
    imagick::RESOURCETYPE_THREAD: 1
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, 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, J2C, J2K, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, 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, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: unknown

### wp-server ###

server_architecture: Linux 3.10.0-1160.53.1.vz7.185.3 x86_64
httpd_software: Apache
php_version: 7.4.33 64bit
php_sapi: fpm-fcgi
max_input_variables: 1500
time_limit: 30
memory_limit: 1G
admin_memory_limit: 512M
max_input_time: 60
upload_max_filesize: 512M
php_post_max_size: 550M
curl_version: 7.86.0 OpenSSL/1.1.1s
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true

### wp-database ###

extension: mysqli
server_version: 10.3.37-MariaDB
client_version: mysqlnd 7.4.33
max_allowed_packet: 268435456
max_connections: 100

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/mafwor5/public_html/wp-content
WP_PLUGIN_DIR: /home/mafwor5/public_html/wp-content/plugins
WP_MEMORY_LIMIT: 1G
WP_MAX_MEMORY_LIMIT: 512M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
DB_CHARSET: utf8mb4
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable

### jetpack ###

site_id: 199505233
ssl_cert: No
time_diff: undefined
version_option: 11.6:1671412013
old_version: 11.6:1671412013
public: Public
master_user: #1 joneiseman
current_user: #1 joneiseman
tokens_set: Blog User
blog_token: )I8kzKejo7qgtiMly#OE7Emy&lsXp@Ii
user_token: oI03KL*99#uTw9UVpy*5kAvuoUXbB5l@
version: 11.6
jp_plugin_dir: /home/mafwor5/public_html/wp-content/plugins/jetpack/
plan: free
protect_header: false
full_sync: {"started":"Mon, 19 Dec 2022 01:07:11 +0000","finished":"Mon, 19 Dec 2022 01:07:37 +0000","progress":{"options":{"finished":true},"functions":{"finished":true},"constants":{"finished":true},"users":{"total":"1","sent":1,"finished":true,"last_sent":"1"},"network_options":{"finished":true}},"config":{"options":true,"functions":true,"constants":true,"users":[1],"network_options":true}}
sync_size: undefined
sync_lag: 0 seconds
full_sync_size: undefined
full_sync_lag: 0 seconds
idc_urls: {"home":"https:\/\/mafw.org","siteurl":"https:\/\/mafw.org","WP_HOME":"","WP_SITEURL":""}
idc_error_option: false
idc_optin: true
cxn_tests: All Pass.

### buddypress ###

version: 10.6.0
active_components: Community Members, Extended Profiles, Account Settings, Activity Streams, Notifications, User Groups, Site Tracking
template_pack: BuddyPress Legacy 10.6.0
! hide-loggedout-adminbar: No
! bp-disable-account-deletion: No
! bp-disable-avatar-uploads: Yes
! bp-disable-cover-image-uploads: Yes
bp-enable-members-invitations: undefined
bp-enable-membership-requests: undefined
! bp-disable-profile-sync: Yes
! bp_restrict_group_creation: No
! bp-disable-group-avatar-uploads: Yes
! bp-disable-group-cover-image-uploads: Yes
! bp-disable-blogforum-comments: Yes
_bp_enable_heartbeat_refresh: Yes

### pods ###

pods-server-software: Apache
pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
pods-session-save-path: /var/cpanel/php/sessions/ea-php74
pods-session-save-path-exists: Yes
pods-session-save-path-writable: Yes
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: 169.645M
pods-memory-current-usage-real: 28.000M
pods-network-wide: No
pods-install-location: /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: Yes
pods-relationship-table-status: 123,551

### pmpro ###

pmpro-cron-jobs: pmpro_cron_expire_memberships (2022-12-29 01:09:01) | 
pmpro_cron_expiration_warnings (2022-12-29 01:09:02) | 
pmpro_cron_admin_activity_email (2022-12-29 14:30:00) | 
pmpro_cron_delete_tmp (2022-12-29 14:30:00) | 
pmpro_cron_stripe_subscription_updates (2022-12-29 20:09:01) | 
pmpro_cron_credit_card_expiring_warnings (2023-01-05 20:09:01) | 
pmpro_license_check_key (2023-01-05 20:09:01)
pmpro-gateway: PayPal Standard [paypalstandard]
pmpro-gateway-env: Live/Production [live]
pmpro-orders: 1186 orders
pmpro-discount-codes: 83 discount codes
pmpro-sessions: 
    session_status: Active
pmpro-membership-levels: {
    "1": {
        "id": "1",
        "name": "1 year individual membership",
        "description": "",
        "confirmation": "",
        "initial_payment": 30,
        "billing_amount": 0,
        "cycle_number": "0",
        "cycle_period": "",
        "billing_limit": "0",
        "trial_amount": 0,
        "trial_limit": "0",
        "allow_signups": "1",
        "expiration_number": "1",
        "expiration_period": "Year"
    },
    "2": {
        "id": "2",
        "name": "2 year individual membership",
        "description": "",
        "confirmation": "",
        "initial_payment": 57,
        "billing_amount": 0,
        "cycle_number": "0",
        "cycle_period": "",
        "billing_limit": "0",
        "trial_amount": 0,
        "trial_limit": "0",
        "allow_signups": "1",
        "expiration_number": "2",
        "expiration_period": "Year"
    },
    "3": {
        "id": "3",
        "name": "3 year individual membership",
        "description": "",
        "confirmation": "",
        "initial_payment": 81,
        "billing_amount": 0,
        "cycle_number": "0",
        "cycle_period": "",
        "billing_limit": "0",
        "trial_amount": 0,
        "trial_limit": "0",
        "allow_signups": "1",
        "expiration_number": "3",
        "expiration_period": "Year"
    },
    "4": {
        "id": "4",
        "name": "1 year dual membership",
        "description": "",
        "confirmation": "",
        "initial_payment": 50,
        "billing_amount": 0,
        "cycle_number": "0",
        "cycle_period": "",
        "billing_limit": "0",
        "trial_amount": 0,
        "trial_limit": "0",
        "allow_signups": "1",
        "expiration_number": "1",
        "expiration_period": "Year"
    },
    "5": {
        "id": "5",
        "name": "2 year dual membership",
        "description": "",
        "confirmation": "",
        "initial_payment": 90,
        "billing_amount": 0,
        "cycle_number": "0",
        "cycle_period": "",
        "billing_limit": "0",
        "trial_amount": 0,
        "trial_limit": "0",
        "allow_signups": "1",
        "expiration_number": "2",
        "expiration_period": "Year"
    },
    "6": {
        "id": "6",
        "name": "3 year dual membership",
        "description": "",
        "confirmation": "",
        "initial_payment": 125,
        "billing_amount": 0,
        "cycle_number": "0",
        "cycle_period": "",
        "billing_limit": "0",
        "trial_amount": 0,
        "trial_limit": "0",
        "allow_signups": "1",
        "expiration_number": "3",
        "expiration_period": "Year"
    }
}
pmpro-custom-templates: No template overrides
pmpro-getfile-usage: PMPRO_GETFILE_ENABLED is not set
pmpro-htaccess-cache-usage: Off
pmpro-pages: 
    account: https://mafw.org/membership-account/
    billing: https://mafw.org/membership-billing/
    cancel: https://mafw.org/membership-cancel/
    checkout: https://mafw.org/membership-checkout/
    confirmation: https://mafw.org/membership-confirmation/
    invoice: https://mafw.org/membership-invoice/
    levels: https://mafw.org/membership-levels/
    login: Not Set
    member_profile_edit: Not Set
    pmprobp_restricted: https://mafw.org/membership-account/access-restricted/
pmpro-library-conflicts: No library conflicts detected.

`

Pods Package

No response

jeiseman commented 1 year ago

Created pull request to fix this problem. Branch main/6979-fix-this-problem

sc0ttkclark commented 1 year ago

I'll make sure it returns 0 in the SQL context here since we use a special handler for this case already anyways.

jeiseman commented 1 year ago

I see there's a function pods_evaluate_tags_sql but that function is not called (pods_evaluate_tag is called). I'm not sure if that's the handler you're referring to.

sc0ttkclark commented 1 year ago

Fixed via https://github.com/pods-framework/pods/commit/94b1ffb985bedc08cfe874db34086a211bf85a11

jeiseman commented 1 year ago

I believe there was an error in the fix 94b1ffb on line 703 it should be } elseif ( 'ID' === $var ) {

Can you reopen this issue or should I file a new issue?