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

Fatal error: Unsupported operand types with v2.7.12 #5269

Closed vicmich closed 5 years ago

vicmich commented 5 years ago

Issue Overview

When saving custom post type:

Fatal error: Unsupported operand types in ..... /wp-content/plugins/pods/classes/fields/number.php on line 171

Expected Behavior

Current Behavior

My client updated to WP 5 at the beginning of December (currently on 5.0.3.) I see that our Pods automatically updated on December 12 to 2.7.12.

On January 5 he noticed this error for the first time – he doesn't think he made any entries or edits after between WP update and then. When saving custom post type "trail", we get:

Fatal error: Unsupported operand types in /home1/bookkeeper/public_html/OntarioNatureTrails.com/wp-content/plugins/pods/classes/fields/number.php on line 171

I also encounter the same error on front end when using WP's standard search if I enter the keyword "trail" in the search field – for other words, search works normally.

PHP 5.4.45

Happy to set you up as admin if that helps.

http://ontarionaturetrails.com

Thanks very much!

Vic

Steps to Reproduce (for bugs)

  1. Hit "publish" or "update" when saving custom post type: trail
  2. Enter the single word "trail" in WordPress search field

Possible Solution

WordPress Environment

5.0.3

Debug Information WordPress Version: 5.0.3 PHP Version: 5.4.45 MySQL Version: 5.6.41 Server Software: Apache Your User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Firefox/60.0 Session Save Path: /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: 256M Current Memory Usage: 90.852M Current Memory Usage (real): 92.500M Pods Network-Wide Activated: No Pods Install Location: /home1/bookkeeper/public_html/OntarioNatureTrails.com/wp-content/plugins/pods/ Pods Tableless Mode Activated: No Pods Light Mode Activated: No Currently Active Theme: OntarioNatureTrails Currently Active Plugins: • Akismet Anti-Spam: 4.1 • Broken Link Checker: 1.11.5 • Comment Images Reloaded: 2.2.1 • Contact Form 7: 5.1.1 • Elegant Themes Updater: 1.2 • Google Maps v3 Shortcode multiple Markers: 1.0 • Jetpack by WordPress.com: 6.8.1 • Ontario Trails Posts: • Pods - Custom Content Types and Fields: 2.7.12 • Regenerate Thumbnails: 3.1.0 • SAM Pro (Free Edition): 2.5.0 • Trail Pins: 0.1 BETA • Ultimate WP Query Search Filter: 1.0.10 • VaultPress: 1.9.7 • Widget Logic: 5.9.0 • WooCommerce: 3.5.3 • Yoast SEO: 9.2.1

Pods Package Export (helpful!)

{"meta":{"version":"2.7.12","build":1547161975},"pods":{"382":{"id":382,"name":"citytown","label":"Cities\/Towns","description":"","type":"taxonomy","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":1,"label_singular":"City\/Town","public":"1","show_ui":"1","hierarchical":"1","rewrite":"1","rewrite_with_front":"1","rewrite_hierarchical":"1","query_var":"0","sort":"0","built_in_post_types_page":"0","built_in_post_types_post":"0","built_in_post_types_project":"0","built_in_post_types_trail":"1","built_in_post_types_attachment":"0","menu_location":"default","menu_position":"0","show_in_nav_menus":"1","show_tagcloud":"1","show_admin_column":"1","pfat_enable":"0","pfat_append_archive":"append","pfat_single":"characteristics","rewrite_custom_slug":"city-town","label_parent_item_colon":"Parent City\/Town"},"376":{"id":376,"name":"region","label":"Regions","description":"","type":"taxonomy","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":1,"label_singular":"Region","public":"1","show_ui":"1","hierarchical":"1","rewrite":"1","rewrite_with_front":"1","rewrite_hierarchical":"1","query_var":"0","sort":"0","built_in_post_types_page":"0","built_in_post_types_post":"0","built_in_post_types_project":"0","built_in_post_types_trail":"1","built_in_post_types_attachment":"0","menu_location":"default","menu_position":"0","show_in_nav_menus":"1","show_tagcloud":"1","show_admin_column":"1","pfat_enable":"0","pfat_append_archive":"append","pfat_single":"characteristics"},"118":{"id":118,"name":"trail","label":"Trails","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"length":{"id":119,"name":"length","label":"Length","description":"","help":"","class":"","type":"text","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_allow_html":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","text_repeatable":"0","text_placeholder":""},"difficulty":{"id":120,"name":"difficulty","label":"Difficulty","description":"","help":"","class":"","type":"pick","weight":1,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_taggable":"0","pick_limit":"0","pick_allow_html":"0","pick_user_role":[],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","pick_custom":"easy|Easy\nmoderate|Moderate\ndifficult|Difficult","pick_post_status":"publish","pick_allow_add_new":1,"pick_show_icon":1,"pick_show_edit_link":1,"pick_show_view_link":1,"pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"trail_surface":{"id":182,"name":"trail_surface","label":"Trail surface","description":"","help":"","class":"","type":"pick","weight":2,"pick_object":"custom-simple","pick_val":"","sister_id":"","pick_custom":"Boardwalks\nCompacted soil\/hard packed\nGravel\nNatural\nRock\nPaved\nStone Dust\nCrushed limestone","required":"0","pick_format_type":"multi","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_taggable":"0","pick_limit":"0","pick_allow_html":"0","pick_user_role":[],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","pick_post_status":[],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","pick_allow_add_new":1,"pick_show_icon":1,"pick_show_edit_link":1,"pick_show_view_link":1,"pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"trail_use":{"id":179,"name":"trail_use","label":"Trail Use","description":"","help":"","class":"","type":"pick","weight":3,"pick_object":"custom-simple","pick_val":"","sister_id":"","pick_custom":"Hiking\nCross-country skiing\nSnowshoeing\nMountain biking\nCycling\nSnowmobiling\nEquestrian\nBirdwatching\nGeocaching","required":"0","pick_format_type":"multi","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_taggable":"0","pick_limit":"0","pick_allow_html":"0","pick_user_role":[],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","pick_post_status":[],"pick_allow_add_new":1,"pick_show_icon":1,"pick_show_edit_link":1,"pick_show_view_link":1,"pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"wheelchair_accessible":{"id":2013,"name":"wheelchair_accessible","label":"Wheelchair accessible","description":"","help":"","class":"","type":"boolean","weight":4,"pick_object":"","pick_val":"","sister_id":"","required":"0","pick_allow_html":"0","pick_post_status":["publish"],"boolean_format_type":"checkbox","boolean_yes_label":"Yes","boolean_no_label":"No","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0"},"wheelchair_accessible_partial":{"id":2016,"name":"wheelchair_accessible_partial","label":"Partially wheelchair accessible","description":"","help":"","class":"","type":"boolean","weight":5,"pick_object":"","pick_val":"","sister_id":"","required":"0","unique":"0","pick_allow_html":"0","pick_post_status":["publish"],"boolean_format_type":"checkbox","boolean_yes_label":"Yes","boolean_no_label":"No","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2"},"accessibility-notes":{"id":135,"name":"accessibility-notes","label":"Accessibility:","description":"","help":"","class":"","type":"text","weight":6,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"500","pick_allow_html":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","text_repeatable":"0","pick_post_status":["publish"],"text_placeholder":""},"gps-lat":{"id":137,"name":"gps-lat","label":"GPS Latitude","description":"","help":"","class":"","type":"number","weight":7,"pick_object":"","pick_val":"","sister_id":"","required":"0","number_format_type":"number","number_format":"i18n","number_decimals":"7","number_step":"1","number_min":"0","number_max":"100","number_max_length":"12","pick_allow_html":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","number_repeatable":"0","default_value":"null","number_format_soft":"0","number_placeholder":""},"gps-long":{"id":161,"name":"gps-long","label":"GPS Longitude","description":"Don't include \"-\" (negative) symbol","help":"","class":"","type":"number","weight":8,"pick_object":"","pick_val":"","sister_id":"","required":"0","number_format_type":"number","number_format":"i18n","number_decimals":"7","number_step":"1","number_min":"0","number_max":"100","number_max_length":"12","pick_allow_html":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","number_repeatable":"0","default_value":"null","pick_post_status":["publish"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","number_format_soft":"0","number_placeholder":""},"trail_location":{"id":668,"name":"trail_location","label":"Trail location (descriptive)","description":"Address, location, etc?","help":"","class":"","type":"text","weight":9,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_allow_html":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","text_repeatable":"0","rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_placeholder":""},"contact_email":{"id":190,"name":"contact_email","label":"Contact email","description":"","help":"","class":"","type":"text","weight":10,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_allow_html":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","text_repeatable":"0","text_placeholder":""},"additional_contact":{"id":191,"name":"additional_contact","label":"Additional contact info","description":"Phone, location, etc?","help":"","class":"","type":"text","weight":11,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_allow_html":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","text_repeatable":"0","pick_post_status":["publish"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_placeholder":""},"amenities_attractions":{"id":186,"name":"amenities_attractions","label":"Amenities","description":"Washrooms? Interpretive signs? Maps? etc.","help":"","class":"","type":"text","weight":12,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_allow_html":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","text_repeatable":"0","pick_post_status":["publish"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_placeholder":""},"attractions":{"id":1995,"name":"attractions","label":"Attractions","description":"","help":"","class":"","type":"text","weight":13,"pick_object":"","pick_val":"","sister_id":"","required":"0","unique":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_allow_html":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"text_repeatable":"0","pick_post_status":["publish"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_placeholder":""},"fees":{"id":667,"name":"fees","label":"Fees","description":"","help":"","class":"","type":"text","weight":14,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_allow_html":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","text_repeatable":"0","text_placeholder":""},"flora_fauna":{"id":184,"name":"flora_fauna","label":"Flora & Fauna","description":"Describe here, but also enter as tags when it will help people to search (e.g. \"ferns\")","help":"","class":"","type":"paragraph","weight":15,"pick_object":"","pick_val":"","sister_id":"","required":"0","paragraph_allow_html":"1","paragraph_oembed":"0","paragraph_wptexturize":"1","paragraph_convert_chars":"1","paragraph_wpautop":"1","paragraph_allow_shortcode":"0","paragraph_allowed_html_tags":"strong em a ul ol li b i","paragraph_max_length":"0","pick_allow_html":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","paragraph_repeatable":"0","paragraph_placeholder":""}},"show_in_menu":"1","label_singular":"Trail","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"trail","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"1","supports_thumbnail":"1","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"1","supports_comments":"1","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_project_category":"1","built_in_taxonomies_project_tag":"1","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_single":"characteristics","pfat_append_single":"append","pfat_append_archive":"append","built_in_taxonomies_region":"1","built_in_taxonomies_citytown":"1","pfat_filter_single":"the_content","pfat_filter_archive":"the_content","rest_enable":"0","rest_base":"trail","read_all":"0","write_all":"0","supports_jetpack_publicize":"0","supports_jetpack_markdown":"0","built_in_taxonomies_product_cat":"0","built_in_taxonomies_product_shipping_class":"0","built_in_taxonomies_product_tag":"0","built_in_taxonomies_product_type":"0","built_in_taxonomies_product_visibility":"0","pfat_run_outside_loop":"0"}},"templates":{"characteristics":{"id":122,"name":"characteristics","code":"<?php echo get_the_term_list( $post->ID, 'region', 'Region(s): ', ' | ' ); ?><br \/>\r\n\r\n<?php echo get_the_term_list( $post->ID, 'citytown', 'Nearby towns and cities: ', ' | ' ); ?><br \/>\r\n<?php echo get_the_term_list( $post->ID, 'project_tag', 'Trail feature tags: ', ' | ' ); ?><br \/>\r\n\r\n

{@post_title} characteristics<\/h2>\r\nLength:<\/b> {@length}<br \/>\r\nDifficulty:<\/b> {@difficulty} (<a href=\"http:\/\/ontarionaturetrails.com\/trail-classifications\/\" target=\"_blank\">Trail classifications<\/a>)<br \/>\r\nTrail surface:<\/b> {@trail_surface}<br \/>\r\nTrail use:<\/b> {@trail_use}<br \/>\r\n[if wheelchair_accessible]Wheelchair accessible<\/b><br \/>[\/if]\r\n[if wheelchair_accessible_partial]Partially wheelchair accessible<\/b><br \/>[\/if]\r\n[if accessibility-notes]Accessibility Notes:<\/b> {@accessibility-notes}<br \/>[\/if]\r\n[if fees]Fees: <\/b> {@fees}<br \/>[\/if]<br \/>\r\n[if flora_fauna]Flora & Fauna:<\/b> {@flora_fauna}<br \/><br \/>[\/if]\r\n[if amenities_attractions]Amenities:<\/b> {@amenities_attractions}<br \/><br \/>[\/if]\r\n[if attractions]Attractions:<\/b> {@attractions}<br \/><br \/>[\/if]\r\nContact:<\/b><br \/>\r\n[if website1]<a href=\"{@website1}\" target=\"_blank\">{@website1}<\/a><br \/>[\/if]\r\n[if website2]<a href=\"{@website2}\" target=\"_blank\">{@website2}<\/a><br \/>[\/if]\r\n[if contact_email]<a href=\"mailto:{@contact_email}\">{@contact_email}<\/a><br \/>[\/if]\r\n[if additional_contact]{@additional_contact}<br \/>[\/if]<br \/>\r\n[if trail_location]Find it:<\/b> {@trail_location}<br \/><br \/>[\/if]\r\n[if gps-lat]GPS Coordinates (main trailhead):<\/b><br \/>\r\nLatitude: {@gps-lat}<br \/>\r\nLongitude: -{@gps-long}<br \/><br \/>[\/if]\r\n\r\n[MultipleMarkerMap z=\"12\" lat=\"{@gps-lat}\" lon=\"-{@gps-long}\" marker=\"{@gps-lat},-{@gps-long}\"]<br \/><br \/>\r\n","type":"template","slug":"trail-characteristics","options":{"_edit_lock":"1537830350:2","_edit_last":"2","admin_only":"","restrict_capability":"","capability_allowed":"","pod_reference":"a:1:{s:3:\"pod\";s:5:\"trail\";}"}}}}

Workaround or Alternate Solution Until Bug is Addressed

Related Issues and/or PRs

sc0ttkclark commented 5 years ago

It sounds like an error related to a custom field having multiple values. That's not yet supported by Pods, so it may have been inserted inadvertently by another plugin or someone with access to the database. One thing to look out for in your database is the values for each gps-lat and gps-long. It appears some trails may have multiple meta_value records in your wp_postmeta table. Clear those up and the error will go away.

Just FYI -- we are adding official support for repeatable fields (multiple values for inputs, apart from Relationships) in 2.9, but right now we are in development with Pods 2.8 to add support for multiple groups of fields. We won't support multiple values for fields in our forms until Pods 2.9.

vicmich commented 5 years ago

Thanks, Scott... I’ll see what I can find.

From: Scott Kingsley Clark [mailto:notifications@github.com] Sent: Thursday, January 10, 2019 10:50 PM To: pods-framework/pods Cc: vicmich; Author Subject: Re: [pods-framework/pods] Fatal error: Unsupported operand types with v2.7.12 (#5269)

It sounds like an error related to a custom field having multiple values. That's not yet supported by Pods, so it may have been inserted inadvertently by another plugin or someone with access to the database. One thing to look out for in your database is the values for each gps-lat and gps-long. It appears some trails may have multiple meta_value records in your wp_postmeta table. Clear those up and the error will go away.

Just FYI -- we are adding official support for repeatable fields (multiple values for inputs, apart from Relationships) in 2.9, but right now we are in development with Pods 2.8 to add support for multiple groups of fields. We won't support multiple values for fields in our forms until Pods 2.9.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pods-framework/pods/issues/5269#issuecomment-453369241 , or mute the thread https://github.com/notifications/unsubscribe-auth/ABWj9Ue8DPrQBPD2Mcxa7WXaKbQ4XdJWks5vCAnUgaJpZM4Z6g-J . https://github.com/notifications/beacon/ABWj9ffoHZ-CvXVaDyBKr-MEQ81sEPL7ks5vCAnUgaJpZM4Z6g-J.gif

vicmich commented 5 years ago

Hi Scott

I admit “multiple values for inputs” is getting out of my depth here, and I don’t expect you to handhold me, but just wanted to note, I’ve queried wp_postmeta with:

SELECT post_id FROM wp_postmeta WHERE meta_key LIKE '%gps-long%' GROUP BY post_id HAVING count(post_id) > 1;

for both gps-lat and gps-long (which I guess you suggested I examine because they’re the only number fields(?)). And I’m getting zero results.

Does what I’ve done make sense to find the multiple values? As I say, I don’t expect to be coddled ;-), but want to know if I’m on right track.

Thanks very much for a great plugin and your help so far.

I’m going to be away all of next week, so will update my client and see if he’s okay with not doing any trail updates till I’m back and have had a chance to spend more time on it.

Thanks!

Vic

From: Scott Kingsley Clark [mailto:notifications@github.com] Sent: Thursday, January 10, 2019 10:50 PM To: pods-framework/pods Cc: vicmich; Author Subject: Re: [pods-framework/pods] Fatal error: Unsupported operand types with v2.7.12 (#5269)

It sounds like an error related to a custom field having multiple values. That's not yet supported by Pods, so it may have been inserted inadvertently by another plugin or someone with access to the database. One thing to look out for in your database is the values for each gps-lat and gps-long. It appears some trails may have multiple meta_value records in your wp_postmeta table. Clear those up and the error will go away.

Just FYI -- we are adding official support for repeatable fields (multiple values for inputs, apart from Relationships) in 2.9, but right now we are in development with Pods 2.8 to add support for multiple groups of fields. We won't support multiple values for fields in our forms until Pods 2.9.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pods-framework/pods/issues/5269#issuecomment-453369241 , or mute the thread https://github.com/notifications/unsubscribe-auth/ABWj9Ue8DPrQBPD2Mcxa7WXaKbQ4XdJWks5vCAnUgaJpZM4Z6g-J . https://github.com/notifications/beacon/ABWj9ffoHZ-CvXVaDyBKr-MEQ81sEPL7ks5vCAnUgaJpZM4Z6g-J.gif

attractions commented 5 years ago

I don’t know why I’m copied on these emails.

Thanks, Matt Roseboom Editor/Publisher Attractions Magazine 7512 Dr. Phillips Blvd. STE 50-612 Orlando FL 32819 Phone: (407) 741-3200 AttractionsMagazine.com http://attractionsmagazine.com/

On Jan 11, 2019, at 6:24 PM, vicmich notifications@github.com wrote:

Hi Scott

I admit “multiple values for inputs” is getting out of my depth here, and I don’t expect you to handhold me, but just wanted to note, I’ve queried wp_postmeta with:

SELECT post_id FROM wp_postmeta WHERE meta_key LIKE '%gps-long%' GROUP BY post_id HAVING count(post_id) > 1;

for both gps-lat and gps-long (which I guess you suggested I examine because they’re the only number fields(?)). And I’m getting zero results.

Does what I’ve done make sense to find the multiple values? As I say, I don’t expect to be coddled ;-), but want to know if I’m on right track.

Thanks very much for a great plugin and your help so far.

I’m going to be away all of next week, so will update my client and see if he’s okay with not doing any trail updates till I’m back and have had a chance to spend more time on it.

Thanks!

Vic

From: Scott Kingsley Clark [mailto:notifications@github.com] Sent: Thursday, January 10, 2019 10:50 PM To: pods-framework/pods Cc: vicmich; Author Subject: Re: [pods-framework/pods] Fatal error: Unsupported operand types with v2.7.12 (#5269)

It sounds like an error related to a custom field having multiple values. That's not yet supported by Pods, so it may have been inserted inadvertently by another plugin or someone with access to the database. One thing to look out for in your database is the values for each gps-lat and gps-long. It appears some trails may have multiple meta_value records in your wp_postmeta table. Clear those up and the error will go away.

Just FYI -- we are adding official support for repeatable fields (multiple values for inputs, apart from Relationships) in 2.9, but right now we are in development with Pods 2.8 to add support for multiple groups of fields. We won't support multiple values for fields in our forms until Pods 2.9.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pods-framework/pods/issues/5269#issuecomment-453369241 , or mute the thread https://github.com/notifications/unsubscribe-auth/ABWj9Ue8DPrQBPD2Mcxa7WXaKbQ4XdJWks5vCAnUgaJpZM4Z6g-J . https://github.com/notifications/beacon/ABWj9ffoHZ-CvXVaDyBKr-MEQ81sEPL7ks5vCAnUgaJpZM4Z6g-J.gif

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pods-framework/pods/issues/5269#issuecomment-453688922, or mute the thread https://github.com/notifications/unsubscribe-auth/AC3qqa3wn49rGG1vklJLcN7rnRQUeriJks5vCR09gaJpZM4Z6g-J.

vicmich commented 5 years ago

This error continues, and hope you can help.

I've queried for multiple meta_value records for same post_id for both gps-lat and gps-long and I get zero results. These are the only two number (plain number) fields in the trails post type.

I can see multiple values for relationship fields, such as difficulty, trail_use, trail_surface, but understand these to be okay, with added values for_pods_difficulty, etc meta_keys.

After deleting two trail_use records for one trail, I was able to re-enter the data in admin and save it successfully, but I can't add a new trail without getting the error. Thanks.

pglewis commented 5 years ago

I had mislabeled the milestone and project for this one but it's high on the list of issues I'm currently going through for the next maintenance release (current target for release: within a week)

vicmich commented 5 years ago

This problem seems to have cleared up, though not sure exactly what happened.

I rolled back Pods first to 2.7.10, then to 2.7.9 with no improvement.

I deactivated, singly, a few plugins that updated around the same time as WP and Pods in December. No improvement and reactivated.

I deactivated, at the same time, two custom plugins: 1) the pods-template-filter.php, to set up the layout template. 2) A multi-pin plugin I'd created to show all the trails on a map on the archive page for a specific region or town category.

I was able to save a trail (draft) with no error. Great, I thought, my fault.

I reactivated the template filter. Still good. I reactivated the multi-pin plugin. Surprisingly, still good.

Updated pods to 2.7.12 and have been able to save multiple times without the error.

quasel commented 5 years ago

as it seems it's fixed for you and we didn't get similar reports I would say that's been an hard to track edge case and going to close the issue! Feel free to post again I you run into the issue again we can reopen it again!