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

Only 2 of 3 Required Parameters Passed: pods_api_post_save_pod_item_{podname} #7032

Closed dbareis closed 1 year ago

dbareis commented 1 year ago

Description

RE: https://docs.pods.io/code/action-reference/pods_api_post_save_pod_item_podname/

The documentation shows 3 parameters, 3 parameters are sometimes passed, as the function doesn't always fail.

Fatal error: Uncaught ArgumentCountError: Too few arguments to function PLANT_post_save_function(), 2 passed in /home/wcipporg/public_html/wp-includes/class-wp-hook.php on line 310 and exactly 3 expected in /home/wcipporg/public_html/wp-content/themes/oceanwp-child-theme-master/functions-generic-wordpress-hooks-filters-actions.php:214

Stack Trace
1.  
PLANT_post_save_function(Array, false)
/home/wcipporg/public_html/wp-includes/class-wp-hook.php:310
2.  
WP_Hook->apply_filters(Array, Array)
/home/wcipporg/public_html/wp-includes/plugin.php:205
3.  
apply_filters('pods_api_post_s...', Array, false, 10289, Object(PodsAPI))
/home/wcipporg/public_html/wp-content/plugins/pods/includes/general.php:111
4.  
pods_do_hook('api', 'post_save_pod_i...', Array, Object(PodsAPI))
/home/wcipporg/public_html/wp-content/plugins/pods/classes/PodsAPI.php:11237
5.  
PodsAPI->do_hook('post_save_pod_i...', Array, false, 10289)
/home/wcipporg/public_html/wp-content/plugins/pods/classes/PodsAPI.php:5631
6.  
/home/wcipporg/public_html/wp-content/p in /home/wcipporg/public_html/wp-content/themes/oceanwp-child-theme-master/functions-generic-wordpress-hooks-filters-actions.php on line 214

Line 214 is: function PLANT_post_save_function($pieces, $is_new_item, $id)

Version

2.9.13

Testing Instructions

Save a "plant" pod after adding:

//===========================================================================
function PLANT_post_save_function($pieces, $is_new_item, $id)
//===========================================================================
{
    error_log("PLANT_post_save_function() - START");
    wp_save_post_revision($id);
    error_log("PLANT_post_save_function() - END - AFTER: wp_save_post_revision()");
    return $pieces;
}
add_filter('pods_api_post_save_pod_item_plant', 'PLANT_post_save_function', 10, 2);

Screenshots / Screencast

No response

Possible Workaround

No response

Site Health Information

`
### wp-core ###

version: 6.1.1
site_language: en_AU
user_language: en_AU
timezone: Australia/Melbourne
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 7
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /home/wcipporg/public_html
wordpress_size: 963.34 MB (1010131030 bytes)
uploads_path: /home/wcipporg/public_html/wp-content/uploads
uploads_size: 329.03 MB (345009729 bytes)
themes_path: /home/wcipporg/public_html/wp-content/themes
themes_size: 23.84 MB (25003113 bytes)
plugins_path: /home/wcipporg/public_html/wp-content/plugins
plugins_size: 207.52 MB (217597455 bytes)
database_size: 34.69 MB (36372480 bytes)
total_size: 1.52 GB (1634113807 bytes)

### wp-active-theme ###

name: OceanWP Child Theme (oceanwp-child-theme-master)
version: 1.0
author: OceanWP
author_website: https://oceanwp.org/
parent_theme: OceanWP (oceanwp)
theme_features: core-block-patterns, widgets-block-editor, align-wide, wp-block-styles, responsive-embeds, editor-styles, editor-style, menus, post-formats, title-tag, automatic-feed-links, post-thumbnails, custom-header, custom-logo, html5, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, customize-selective-refresh-widgets, widgets
theme_path: /home/wcipporg/public_html/wp-content/themes/oceanwp-child-theme-master
auto_update: Disabled

### wp-parent-theme ###

name: OceanWP (oceanwp)
version: 3.4.2
author: OceanWP
author_website: https://oceanwp.org/about-oceanwp/
theme_path: /home/wcipporg/public_html/wp-content/themes/oceanwp
auto_update: Disabled

### wp-themes-inactive (1) ###

Twenty Twenty-Three: version: 1.0, author: the WordPress team, Auto-updates disabled

### wp-mu-plugins (2) ###

Health Check Troubleshooting Mode: author: (undefined), version: 1.8.1
WP STAGING Optimizer: version: 1.5.1, author: René Hermenau

### wp-plugins-active (23) ###

Admin Menu Editor: version: 1.10.4, author: Janis Elsts, Auto-updates enabled
Akismet Anti-Spam: version: 5.0.2, author: Automattic, Auto-updates enabled
Backup Duplicator & Migration - WP STAGING: version: 2.13.0, author: WP-STAGING, WPStagingBackup, Auto-updates enabled
Category Order and Taxonomy Terms Order: version: 1.7.4, author: Nsp-Code, Auto-updates enabled
Easy Google Maps: version: 1.11.7, author: supsystic.com, Auto-updates enabled
Easy WP SMTP: version: 2.0.1, author: Easy WP SMTP, Auto-updates enabled
Error Log Monitor: version: 1.7.4, author: Janis Elsts, Auto-updates enabled
Export Import Menus: version: 1.8.0, author: Akshay Menariya, Auto-updates enabled
Health Check & Troubleshooting: version: 1.5.1, author: The WordPress.org community, Auto-updates enabled
Jetpack: version: 11.9.1, author: Automattic, Auto-updates enabled
Jetpack Boost: version: 1.7.0, author: Automattic - Jetpack Site Speed team, Auto-updates enabled
Jetpack Protect: version: 1.3.0, author: Automattic - Jetpack Security team, Auto-updates enabled
LiteSpeed Cache: version: 5.3.3, author: LiteSpeed Technologies, Auto-updates enabled
Lock User Account: version: 1.0.3, author: teknigar, Auto-updates enabled
Media Library Assistant: version: 3.06, author: David Lingren, Auto-updates enabled
Ocean Extra: version: 2.1.4, author: OceanWP, Auto-updates enabled
Pods - Custom Content Types and Fields: version: 2.9.13, author: Pods Framework Team, Auto-updates enabled
Search Regex: version: 3.0.6, author: John Godley, Auto-updates enabled
Shortcoder: version: 6.1, author: Aakash Chakravarthy, Auto-updates enabled
Simple Location: version: 5.0.10, author: David Shanske, Auto-updates enabled
Table Sorter: version: 2.3, author: Farhan Noor, Auto-updates enabled
UpdraftPlus - Backup/Restore: version: 1.23.3, author: UpdraftPlus.Com, DavidAnderson, Auto-updates enabled
WordPress Importer: version: 0.8, author: wordpressdotorg, Auto-updates enabled

### wp-plugins-inactive (6) ###

LoftLoader: version: 2.4.0, author: Loft.Ocean, Auto-updates enabled
Pods Alternative Cache: version: 2.1.7, author: Pods Framework Team, Auto-updates enabled
Query Monitor: version: 3.12.0, author: John Blackbourn, Auto-updates enabled
WP Go Maps (formerly WP Google Maps): version: 9.0.18, author: WP Go Maps, Auto-updates enabled
WP Revisions Control: version: 1.4.3, author: Erick Hitter, Auto-updates enabled
WP Smart Preloader: version: 1.15.1, author: catchsquare, Auto-updates enabled

### wp-media ###

image_editor: WP_Image_Editor_GD
imagick_module_version: Not available
imagemagick_version: Not available
imagick_version: Not available
file_uploads: File uploads is turned off
post_max_size: 512M
upload_max_filesize: 512M
max_effective_size: 512 MB
max_file_uploads: 20
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: unknown

### wp-server ###

server_architecture: Linux 2.6.32-954.3.5.lve1.4.78.el6.x86_64 x86_64
httpd_software: LiteSpeed
php_version: 7.4.33 64bit
php_sapi: litespeed
max_input_variables: 1000
time_limit: 30
memory_limit: 1024M
max_input_time: 60
upload_max_filesize: 512M
php_post_max_size: 512M
curl_version: 7.84.0 OpenSSL/1.1.1p
suhosin: false
imagick_availability: false
pretty_permalinks: true
htaccess_extra_rules: true

### wp-database ###

extension: mysqli
server_version: 10.2.44-MariaDB-cll-lve
client_version: 10.2.44-MariaDB
max_allowed_packet: 16777216
max_connections: 150

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/wcipporg/public_html/wp-content
WP_PLUGIN_DIR: /home/wcipporg/public_html/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 1024M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: true
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: 184653394
ssl_cert: No
time_diff: undefined
version_option: 11.9.1:1679094391
old_version: 11.9:1679094390
public: Public
master_user: No master user set.
current_user: #3 DennisBareis
tokens_set: Blog 
blog_token: OTPRwoqkt)9xVaV@#RzXO)L70M4kevfN
user_token: Not set.
version: 11.9.1
jp_plugin_dir: /home/wcipporg/public_html/wp-content/plugins/jetpack/
plan: free
protect_header: {"trusted_header":"REMOTE_ADDR","segments":1,"reverse":false}
full_sync: {"started":"Sat, 14 Jan 2023 23:35:50 +0000","finished":"Sat, 14 Jan 2023 23:39:20 +0000","progress":{"options":{"finished":true},"functions":{"finished":true},"constants":{"finished":true},"users":{"total":"1","sent":1,"finished":true,"last_sent":"3"},"network_options":{"finished":true}},"config":{"options":true,"functions":true,"constants":true,"users":[3],"network_options":true}}
sync_size: undefined
sync_lag: 0 seconds
full_sync_size: undefined
full_sync_lag: 0 seconds
idc_urls: {"home":"https:\/\/www.wcipp.org.au","siteurl":"https:\/\/www.wcipp.org.au","WP_HOME":"","WP_SITEURL":""}
idc_error_option: false
idc_optin: true
cxn_tests: All Pass.

### pods ###

pods-server-software: LiteSpeed
pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
pods-session-save-path: /tmp
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: No
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: 112.089M
pods-memory-current-usage-real: 115.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: 580

`

Pods Package

{
    "@meta": {
        "version": "2.9.13",
        "build": 1679272766
    },
    "settings": {
        "types_only": "0",
        "watch_changed_fields": "1",
        "metadata_integration": "1",
        "metadata_override_get": "1",
        "session_auto_start": "0",
        "wisdom_opt_out": ""
    },
    "pods": [
        {
            "name": "light_conditions",
            "id": 5438,
            "label": "Light Conditions",
            "description": "This describes the light conditions required by plants for the best growth.",
            "type": "taxonomy",
            "storage": "meta",
            "label_singular": "Light Condition",
            "public": "1",
            "show_ui": "1",
            "hierarchical": "1",
            "rest_enable": "1",
            "_migrated_28": "1",
            "built_in_post_types_plant": "1",
            "default_term_description": "ssssssssssssssss",
            "show_in_nav_menus": "1",
            "show_in_quick_edit": "1",
            "show_tagcloud": "1",
            "show_admin_column": "1",
            "rewrite": "1",
            "rewrite_with_front": "1",
            "rewrite_hierarchical": "1",
            "capability_type": "default",
            "capability_type_custom": "light_conditions",
            "query_var": "0",
            "sort": "0",
            "label_desc_field_description": "Short Description",
            "required": "0",
            "pfat_enable": "0",
            "pfat_filter_single": "get_the_archive_description",
            "menu_location": "default",
            "groups": [
                {
                    "name": "more_fields",
                    "label": "More Fields",
                    "fields": []
                }
            ]
        },
        {
            "name": "plant_category",
            "id": 5388,
            "label": "Plant Categories",
            "description": "This describes some of the main characteristics the plant has that you can use to decide which are suitable for your intended purpose.",
            "type": "taxonomy",
            "storage": "meta",
            "label_singular": "Plant Category",
            "public": "1",
            "show_ui": "1",
            "hierarchical": "1",
            "rest_enable": "1",
            "_migrated_28": "1",
            "rewrite": "1",
            "rewrite_with_front": "1",
            "rewrite_hierarchical": "1",
            "capability_type_custom": "plant_category",
            "query_var": "0",
            "sort": "0",
            "built_in_post_types_plant": "1",
            "pfat_enable": "0",
            "required": "0",
            "show_in_menu": "1",
            "menu_location": "default",
            "menu_position": "0",
            "show_in_nav_menus": "1",
            "show_tagcloud": "1",
            "show_in_quick_edit": "1",
            "show_admin_column": "1",
            "pfat_single": "Plant Category Template",
            "pfat_append_single": "append",
            "pfat_filter_single": "get_the_archive_description",
            "capability_type": "default",
            "label_desc_field_description": "Short Description",
            "groups": [
                {
                    "name": "more_fields",
                    "label": "More Fields",
                    "fields": []
                }
            ]
        },
        {
            "name": "plant",
            "id": 5356,
            "label": "Plants",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "label_singular": "Plant",
            "public": "1",
            "show_ui": "1",
            "rest_enable": "1",
            "supports_title": "1",
            "supports_editor": "1",
            "_migrated_28": "1",
            "required": "0",
            "pfat_enable": "0",
            "pfat_single": "Plant Template",
            "pfat_filter_single": "the_content",
            "pfat_archive": "Plant Category Template",
            "pfat_run_outside_loop": "0",
            "pfat_append_single": "replace",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type_custom": "plant",
            "capability_type_extra": "1",
            "has_archive": "1",
            "hierarchical": "0",
            "can_export": "1",
            "rewrite": "1",
            "rewrite_with_front": "0",
            "rewrite_feeds": "0",
            "rewrite_pages": "1",
            "query_var": "1",
            "default_status": "draft",
            "supports_author": "0",
            "supports_thumbnail": "0",
            "supports_comments": "0",
            "revisions_to_keep_limit": "0",
            "delete_with_user": "0",
            "built_in_taxonomies_plant_category": "1",
            "built_in_taxonomies_plant_categoryx": "1",
            "placeholder_enter_title_here": "{{Scientific Name of the plant}}",
            "pfat_append_archive": "prepend",
            "built_in_taxonomies_growing_condition": "1",
            "built_in_taxonomies_growing_condition2": "1",
            "built_in_taxonomies_light_condition": "1",
            "supports_page_attributes": "0",
            "supports_jetpack_markdown": "0",
            "supports_jetpack_publicize": "0",
            "built_in_taxonomies_soil_condition": "1",
            "built_in_taxonomies_soil_conditions": "1",
            "capability_type": "page",
            "pfat_filter_archive": "the_excerpt",
            "built_in_taxonomies_light_conditions": "1",
            "meta_box_context": "normal",
            "meta_box_priority": "default",
            "show_in_nav_menus": "0",
            "supports_revisions": "1",
            "required_help_boolean": "0",
            "groups": [
                {
                    "name": "visitor_visible_fields",
                    "id": 5770,
                    "label": "Visitor Visible Fields (hint: Scientific Name & Description entered ABOVE)",
                    "description": "",
                    "weight": 0,
                    "meta_box_context": "advanced",
                    "meta_box_priority": "high",
                    "roles_allowed": "administrator",
                    "fields": [
                        {
                            "name": "plant_previous_botanical_names",
                            "id": 5982,
                            "label": "Previous Botanical Name(s)",
                            "description": "Comma separated list of previous botanical names (if any)",
                            "weight": 0,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "text_trim": "1"
                        },
                        {
                            "name": "plant_common_names",
                            "id": 5360,
                            "label": "Common Name(s)",
                            "description": "e.g. Gold Dust Wattle [NOTE: Scientific Name goes Above 'Edit Pod']",
                            "weight": 1,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "100",
                            "repeatable": "1",
                            "repeatable_format": "custom",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "text_trim": "1",
                            "repeatable_format_separator": ", ",
                            "repeatable_add_new_label": "Add New Common Name"
                        },
                        {
                            "name": "plant_status",
                            "id": 5577,
                            "label": "Plant Status",
                            "description": "e.g. \"Not currently Available\" OR \"DISABLED:\" followed by reason (to remove plant from website). For \"to do\" items use the supplied field (not this one).",
                            "weight": 2,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "text_trim": "1",
                            "text_allow_html": "1",
                            "text_placeholder": "{{normally blank if no sales issues}}",
                            "text_allow_shortcode": "1"
                        },
                        {
                            "name": "plant_size",
                            "id": 5452,
                            "label": "Size (H x W)",
                            "description": "e.g. 3x3m or custom description: 1m high",
                            "weight": 3,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "text_trim": "1"
                        },
                        {
                            "name": "plant_foliage",
                            "id": 5453,
                            "label": "Foliage",
                            "description": "Describes the plant",
                            "weight": 4,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "text_trim": "1"
                        },
                        {
                            "name": "plant_flowers",
                            "id": 5454,
                            "label": "Flowers",
                            "description": "Describes flowers e.g. Pale pink 3 petalled from August-November",
                            "weight": 5,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "text_trim": "1"
                        },
                        {
                            "name": "plant_general_comments",
                            "id": 5455,
                            "label": "General Comments",
                            "description": "Anything missing from above?",
                            "weight": 6,
                            "type": "wysiwyg",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "wysiwyg_editor": "tinymce",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "wysiwyg_media_buttons": "1",
                            "wysiwyg_trim": "1",
                            "wysiwyg_allow_shortcode": "1",
                            "wysiwyg_wpautop": "1",
                            "wysiwyg_oembed": "1",
                            "wysiwyg_editor_height": "0"
                        },
                        {
                            "name": "plant_further_information",
                            "id": 5579,
                            "label": "Further Information",
                            "description": "{{Displayed Text |  Tooltip Text | URL}}",
                            "weight": 7,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "512",
                            "required": "0",
                            "repeatable": "1",
                            "repeatable_format": "custom",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "repeatable_add_new_label": "Add New External Link",
                            "text_trim": "1",
                            "text_allow_shortcode": "1",
                            "text_placeholder": "{{Displayed Text |  Tooltip Text | URL}}",
                            "repeatable_format_separator": "<li>"
                        },
                        {
                            "name": "plant_gallery_images",
                            "id": 5478,
                            "label": "Plant Images",
                            "description": "Plant Images for the Gallery. The first image is the MAIN image (order others as you wish).",
                            "weight": 8,
                            "type": "file",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "file_format_type": "multi",
                            "file_uploader": "attachment",
                            "file_type": "images-any",
                            "file_attachment_tab": "browse",
                            "file_upload_dir": "wp",
                            "file_edit_title": "1",
                            "file_show_edit_link": "1",
                            "file_linked": "0",
                            "file_limit": "0",
                            "file_field_template": "tiles",
                            "file_add_button": "Add New Gallery Image",
                            "file_modal_title": "Attach Other Images",
                            "file_modal_add_button": "Add Other Images",
                            "file_wp_gallery_output": "0",
                            "file_wp_gallery_link": "file",
                            "file_wp_gallery_columns": "9",
                            "file_wp_gallery_size": "thumbnail",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "file_wp_gallery_random_sort": "1",
                            "required_help_boolean": "0"
                        },
                        {
                            "name": "plants_similar_plants",
                            "id": 5692,
                            "label": "Similar Plants",
                            "description": "Other plants with similar characteristics",
                            "weight": 9,
                            "type": "pick",
                            "pick_object": "post_type",
                            "pick_val": "plant",
                            "sister_id": "5692",
                            "pick_table": "-- Select One --",
                            "required": "0",
                            "pick_format_type": "multi",
                            "pick_format_single": "dropdown",
                            "pick_format_multi": "autocomplete",
                            "pick_display_format_multi": "custom",
                            "pick_display_format_separator": ", ",
                            "pick_allow_add_new": "1",
                            "pick_taggable": "0",
                            "pick_show_icon": "1",
                            "pick_show_edit_link": "1",
                            "pick_show_view_link": "1",
                            "pick_limit": "0",
                            "pick_user_role": "Administrator",
                            "pick_post_status": "publish",
                            "pick_post_author": "0",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "plant_aboriginal_names",
                            "id": 5771,
                            "label": "Wurundjeri Name",
                            "description": "These are names use by the Wurundjeri (aboriginal) people of Whitehorse.",
                            "weight": 10,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "512",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "text_trim": "1",
                            "text_allow_shortcode": "1",
                            "text_allow_html": "1"
                        },
                        {
                            "name": "plant_bush_tucker_how_its_used",
                            "id": 5755,
                            "label": "Bush Tucker (how it's used)",
                            "description": "If you have added this plant to the \"bush tucker\" category then please describe how it is used.",
                            "weight": 11,
                            "type": "wysiwyg",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "wysiwyg_editor": "tinymce",
                            "wysiwyg_trim": "1"
                        }
                    ]
                },
                {
                    "name": "to_do_needs_review",
                    "id": 7670,
                    "label": "TO DO \/ Needs Review",
                    "description": "",
                    "weight": 1,
                    "meta_box_context": "normal",
                    "meta_box_priority": "default",
                    "roles_allowed": "administrator",
                    "fields": [
                        {
                            "name": "plant_todo",
                            "id": 7671,
                            "label": "TO DO",
                            "description": "When non-blank, indicates that there are things to be fixed\/improved.  When displayed, lines will be numbered (line indentation  &amp; blank lines are ignored).  When adding items please add your name to the end of each item (e.g. '[Dennis Bareis]') so people will know who to ask for any required clarification.",
                            "weight": 0,
                            "type": "paragraph",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "paragraph_allowed_html_tags": "strong em a ul ol li b i",
                            "paragraph_max_length": "-1",
                            "default_value": "This newly created plant needs to be reviewed by someone else. [Plant ADDED BY: {@plant_todo,GetUserName}]",
                            "paragraph_allow_shortcode": "1",
                            "required_help_boolean": "0"
                        }
                    ]
                },
                {
                    "name": "field_group_propagation",
                    "id": 5769,
                    "label": "Propagation (Bungalook Admin Fields)",
                    "description": "",
                    "weight": 2,
                    "meta_box_context": "advanced",
                    "meta_box_priority": "default",
                    "roles_allowed": "administrator",
                    "fields": [
                        {
                            "name": "plant_propagation_details",
                            "id": 5725,
                            "label": "Propagation Details",
                            "description": "How to ...",
                            "weight": 0,
                            "type": "wysiwyg",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "wysiwyg_editor": "tinymce",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "wysiwyg_media_buttons": "1",
                            "wysiwyg_trim": "1",
                            "wysiwyg_allow_shortcode": "1",
                            "wysiwyg_editor_height": "300"
                        },
                        {
                            "name": "plant_seed_collection_from",
                            "id": 5985,
                            "label": "Seed Collection From",
                            "description": "Date when seed collection generally starts (JAN or 15 JAN)",
                            "weight": 1,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "plant_seed_collection_to",
                            "id": 5986,
                            "label": "Seed Collection To",
                            "description": "Date when seed collection generally ends (JAN or 15 JAN)",
                            "weight": 2,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "required_help_boolean": "0"
                        }
                    ]
                },
                {
                    "name": "field_group_plastic_tags",
                    "id": 5987,
                    "label": "Plastic Tags (Bungalook Admin Fields)",
                    "description": "",
                    "weight": 3,
                    "meta_box_context": "advanced",
                    "meta_box_priority": "low",
                    "roles_allowed": "administrator",
                    "fields": [
                        {
                            "name": "plant_plastic_tag_id",
                            "id": 5988,
                            "label": "Tag ID",
                            "description": "",
                            "weight": 0,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        }
                    ]
                },
                {
                    "name": "hidden_fields_-_ignore_this_",
                    "id": 9397,
                    "label": "Hidden Fields - Ignore This :-)",
                    "description": "",
                    "weight": 4,
                    "meta_box_context": "normal",
                    "meta_box_priority": "low",
                    "roles_allowed": "administrator",
                    "admin_only": "1",
                    "fields": [
                        {
                            "name": "plant_update_history",
                            "id": 9398,
                            "label": "Plant Update History",
                            "description": "SEEING PREVIOUS VALUE, ON SAVE: Automatically updated by PHP: PLANT_pre_save_function(). The format of each line is \"TimeStamp-UserID\".",
                            "weight": 12,
                            "type": "paragraph",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "required_help_boolean": "0",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "hidden": "0",
                            "read_only": "1",
                            "paragraph_allowed_html_tags": "strong em a ul ol li b i",
                            "paragraph_max_length": "-1",
                            "paragraph_trim": "1"
                        }
                    ]
                }
            ]
        },
        {
            "name": "soil_conditions",
            "id": 5434,
            "label": "Soil Conditions",
            "description": "This describes the soil conditions required by plants for the best growth.",
            "type": "taxonomy",
            "storage": "meta",
            "label_singular": "Soil Condition",
            "public": "1",
            "show_ui": "1",
            "hierarchical": "1",
            "rest_enable": "1",
            "_migrated_28": "1",
            "built_in_post_types_plant": "1",
            "show_in_menu": "1",
            "menu_position": "0",
            "show_in_nav_menus": "1",
            "show_tagcloud": "1",
            "show_in_quick_edit": "1",
            "show_admin_column": "1",
            "pfat_enable": "0",
            "rewrite": "1",
            "rewrite_with_front": "1",
            "rewrite_hierarchical": "1",
            "capability_type": "default",
            "capability_type_custom": "soil_conditions",
            "query_var": "0",
            "sort": "0",
            "default_term_description": "sajkd sajkasdh jksadhjkd skjhsad soil text",
            "required": "0",
            "label_desc_field_description": "Short Description",
            "menu_location": "default",
            "groups": [
                {
                    "name": "more_fields",
                    "label": "More Fields",
                    "fields": []
                }
            ]
        }
    ],
    "pages": [
        {
            "name": "all-plants*",
            "code": "",
            "id": 5913,
            "_edit_lock": "1674188588:3",
            "_edit_last": "3",
            "admin_only": "0",
            "restrict_role": "0",
            "restrict_capability": "0",
            "restrict_redirect": "0",
            "restrict_redirect_login": "0",
            "_pods_roles_allowed": [
                ""
            ],
            "_pods_capability_allowed": [
                ""
            ],
            "page_template": "plant-list-all-template.php",
            "pod": "0"
        },
        {
            "name": "export-old-plant-pages*",
            "code": "",
            "id": 5978,
            "_edit_lock": "1678685228:3",
            "_edit_last": "3",
            "page_title": "EXPORT OLD PLANT PAGES FOR IMPORT INTO PODS",
            "admin_only": "0",
            "restrict_role": "0",
            "restrict_capability": "0",
            "restrict_redirect": "0",
            "restrict_redirect_login": "0",
            "page_template": "export-existing-plant-pages.php",
            "pod": "0",
            "_pods_roles_allowed": [
                ""
            ],
            "_pods_capability_allowed": [
                ""
            ]
        },
        {
            "name": "import-old-plant-pages*",
            "code": "",
            "id": 6018,
            "_edit_lock": "1677462397:3",
            "_edit_last": "3",
            "page_title": "IMPORT OLD PLANT PAGES (PREVIOUSLY EXPORTED) INTO PODS",
            "admin_only": "0",
            "restrict_role": "0",
            "restrict_capability": "0",
            "restrict_redirect": "0",
            "restrict_redirect_login": "0",
            "page_template": "import-existing-plant-pages.php",
            "pod": "0",
            "_pods_roles_allowed": [
                ""
            ],
            "_pods_capability_allowed": [
                ""
            ]
        },
        {
            "name": "plant\/*",
            "code": "",
            "id": 5719,
            "_edit_lock": "1677724526:3",
            "_edit_last": "3",
            "admin_only": "0",
            "restrict_role": "0",
            "restrict_capability": "0",
            "restrict_redirect": "0",
            "restrict_redirect_login": "0",
            "_pods_roles_allowed": [
                ""
            ],
            "_pods_capability_allowed": [
                ""
            ],
            "page_template": "php-template-plant-single.php",
            "pod": "plant"
        },
        {
            "name": "search-plants*",
            "code": "",
            "id": 6096,
            "_edit_lock": "1678670250:3",
            "_edit_last": "3",
            "admin_only": "0",
            "restrict_role": "0",
            "restrict_capability": "0",
            "restrict_redirect": "0",
            "restrict_redirect_login": "0",
            "_pods_roles_allowed": [
                ""
            ],
            "_pods_capability_allowed": [
                ""
            ],
            "page_template": "php-search-plants.php",
            "pod": "plant"
        }
    ]
}
dbareis commented 1 year ago

I'm not sure why it doesn't always fail but I believe I found the cause, this was my filter command:

add_filter('pods_api_post_save_pod_item_plant', 'PLANT_post_save_function', 10, 2);

Where it should have been (2->3):

add_filter('pods_api_post_save_pod_item_plant', 'PLANT_post_save_function', 10, 3);

I'll close this, if I see it again, I'll open a new one.

dbareis commented 1 year ago

As above