Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Post add/edit: Uncaught TypeError: array_intersect_key #6378

Open
alex-icstech opened this issue Dec 20, 2021 · 1 comment
Open
Assignees
Milestone

Comments

@alex-icstech
Copy link

alex-icstech commented Dec 20, 2021

Description

In Wordpress 5.8.2 and Pods 2.8.8.1: When I try to add or edit a regular non-Pods WordPress post, I'm seeing the dread "Critical error has occurred on this website", and the error in /var/log/apache2/error.log reads:

[Mon Dec 20 15:45:17.997719 2021] [proxy_fcgi:error] [pid 27:tid 139983084041984] [client 172.18.0.6:53704] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, string given in /var/www/html/cms-service/wp-includes/rest-api/class-wp-rest-server.php:1436

When I go there I see this code:

				foreach ( $callback['args'] as $key => $opts ) {
					$arg_data             = array_intersect_key( $opts, $allowed_schema_keywords );
					$arg_data['required'] = ! empty( $opts['required'] );

					$endpoint_data['args'][ $key ] = $arg_data;
				}

I logged out the $key and $opts, and sure enough, it's failing when the $key is "pod_code" and the $opts is the name of one of my pods. A string, not an array.

I'm on deadline, so I just patched it like this and moved on with my day:

				foreach ( $callback['args'] as $key => $opts ) {
					//Patch
					if(!is_array($opts)) {
						$opts = array("default"=>$opts);
					}
					$arg_data             = array_intersect_key( $opts, $allowed_schema_keywords );
					$arg_data['required'] = ! empty( $opts['required'] );

					$endpoint_data['args'][ $key ] = $arg_data;
				}

I can edit, add and delete regular non-pod posts.

Version

2.8.8.1

Testing Instructions

No response

Screenshots / Screencast

No response

Possible Workaround

Convert the $opts to an array in the for-loop circa line 1436 in /var/www/html/cms-service/wp-includes/rest-api/class-wp-rest-server.php.

Change this:

				foreach ( $callback['args'] as $key => $opts ) {
					$arg_data             = array_intersect_key( $opts, $allowed_schema_keywords );
					$arg_data['required'] = ! empty( $opts['required'] );

					$endpoint_data['args'][ $key ] = $arg_data;
				}

To this:

				foreach ( $callback['args'] as $key => $opts ) {
					//
					if(!is_array($opts)) {
						$opts = array("default"=>$opts);
					}
					$arg_data             = array_intersect_key( $opts, $allowed_schema_keywords );
					$arg_data['required'] = ! empty( $opts['required'] );

					$endpoint_data['args'][ $key ] = $arg_data;
				}

Site Health Information

`
### wp-core ###

version: 5.8.2
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%year%/%monthnum%/%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 1
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /var/www/html/cms-service
wordpress_size: 43.82 MB (45946017 bytes)
uploads_path: /var/www/html/cms-service/wp-content/uploads
uploads_size: 4.52 MB (4743677 bytes)
themes_path: /var/www/html/cms-service/wp-content/themes
themes_size: 99.53 MB (104364618 bytes)
plugins_path: /var/www/html/cms-service/wp-content/plugins
plugins_size: 24.51 MB (25701700 bytes)
database_size: 3.66 MB (3833856 bytes)
total_size: 176.04 MB (184589868 bytes)

### wp-active-theme ###

name: Null Theme (null_theme)
version: 1.4
author: Alex Lowe
author_website: https://wordpress.org/
parent_theme: none
theme_features: core-block-patterns, widgets-block-editor
theme_path: /var/www/html/cms-service/wp-content/themes/null_theme
auto_update: Disabled

### wp-plugins-active (5) ###

Pod Component - Dropdown Picker: version: 1.0, author: Alex Lowe, Auto-updates disabled
Pod Component - Time Range Slider: version: 1.0, author: Alex Lowe, Auto-updates disabled
Pods - Custom Content Types and Fields: version: 2.8.8.1, author: Pods Framework Team, Auto-updates disabled
Pods Component - Google Map with Address Field: version: 1.0, author: Alex Lowe, Auto-updates disabled
Yoast SEO: version: 17.3, author: Team Yoast (latest version: 17.8), Auto-updates disabled

### wp-plugins-inactive (1) ###

Akismet Anti-Spam: version: 4.2.1, author: Automattic, Auto-updates disabled

### 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: 8M
upload_max_filesize: 2M
max_effective_size: 2 MB
max_file_uploads: 20
gd_version: 2.3.0
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: not available

### wp-server ###

server_architecture: Linux 5.10.16.3-microsoft-standard-WSL2 x86_64
httpd_software: Apache/2.4.41 (Ubuntu)
php_version: 8.0.12 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 30
memory_limit: 128M
admin_memory_limit: 256M
max_input_time: 60
upload_max_filesize: 2M
php_post_max_size: 8M
curl_version: 7.68.0 OpenSSL/1.1.1f
suhosin: false
imagick_availability: false
pretty_permalinks: true
htaccess_extra_rules: true

### wp-database ###

extension: mysqli
server_version: 5.7.34
client_version: mysqlnd 8.0.12

### wp-constants ###

WP_HOME: https://localhost/cms-service
WP_SITEURL: https://localhost/cms-service
WP_CONTENT_DIR: /var/www/html/cms-service/wp-content
WP_PLUGIN_DIR: /var/www/html/cms-service/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_LOCAL_DEV: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

### wp-filesystem ###

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

### pods ###

pods-server-software: Apache/2.4.41 (Ubuntu)
pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
pods-session-save-path: /var/lib/php/sessions
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: 6.474M
pods-memory-current-usage-real: 4.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 Package

{
    "meta": {
        "version": "2.8.8.1",
        "build": 1640018935
    },
    "pods": [
        {
            "name": "contact",
            "id": 164,
            "label": "Contacts",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "label_singular": "Contact",
            "public": "1",
            "show_ui": "1",
            "rest_enable": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "_migrated_28": "1",
            "required": "0",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "post",
            "capability_type_custom": "contact",
            "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",
            "revisions_to_keep_limit": "0",
            "delete_with_user": "1",
            "pfat_enable": "0",
            "pfat_single": "0",
            "pfat_append_single": "true",
            "pfat_filter_single": "the_content",
            "pfat_archive": "0",
            "pfat_append_archive": "true",
            "pfat_filter_archive": "the_excerpt",
            "pfat_run_outside_loop": "0",
            "groups": [
                {
                    "name": "main_fields",
                    "id": 165,
                    "label": "Main Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "display_title",
                            "id": 286,
                            "label": "Display Title",
                            "description": "What's the display name of this person? (Do not include post-nominals)",
                            "weight": 0,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "job_title",
                            "id": 166,
                            "label": "Job Title",
                            "description": "What's the job title for this contact",
                            "weight": 1,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "post_nominal",
                            "id": 203,
                            "label": "Post Nominal",
                            "description": "What letters should go after this persons name? (e.g. \"MD\")",
                            "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",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "phone_number",
                            "id": 167,
                            "label": "Phone Number",
                            "description": "The phone number",
                            "weight": 3,
                            "type": "phone",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "phone_format": "999-999-9999 x999",
                            "phone_max_length": "25",
                            "phone_html5": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "fax_number",
                            "id": 168,
                            "label": "Fax Number",
                            "description": "The fax number",
                            "weight": 4,
                            "type": "phone",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "phone_format": "999-999-9999 x999",
                            "phone_max_length": "25",
                            "phone_html5": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "email",
                            "id": 169,
                            "label": "Email",
                            "description": "The email address",
                            "weight": 5,
                            "type": "email",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "email_max_length": "255",
                            "email_html5": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "image",
                            "id": 170,
                            "label": "Image",
                            "description": "The image",
                            "weight": 6,
                            "type": "file",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "file_format_type": "single",
                            "file_uploader": "attachment",
                            "file_attachment_tab": "upload",
                            "file_upload_dir": "wp",
                            "file_edit_title": "1",
                            "file_show_edit_link": "0",
                            "file_linked": "0",
                            "file_limit": "0",
                            "file_type": "images",
                            "file_field_template": "rows",
                            "file_add_button": "Add File",
                            "file_modal_title": "Attach a file",
                            "file_modal_add_button": "Add File",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "teams",
                            "id": 266,
                            "label": "Teams",
                            "description": "What teams does this person belong to?",
                            "weight": 7,
                            "type": "pick",
                            "pick_object": "post_type",
                            "pick_val": "team",
                            "sister_id": "268",
                            "post_status": "publish",
                            "pick_table": "-- Select One --",
                            "required": "1",
                            "pick_format_type": "multi",
                            "pick_format_single": "dropdown",
                            "pick_format_multi": "list",
                            "pick_display_format_multi": "default",
                            "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",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "location",
                            "id": 175,
                            "label": "Location",
                            "description": "What location is this person at?",
                            "weight": 8,
                            "type": "pick",
                            "pick_object": "post_type",
                            "pick_val": "location",
                            "sister_id": "-- Select One --",
                            "post_status": "publish",
                            "pick_table": "-- Select One --",
                            "required": "0",
                            "pick_format_type": "multi",
                            "pick_format_single": "list",
                            "pick_format_multi": "list",
                            "pick_display_format_multi": "default",
                            "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",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "bio",
                            "id": 192,
                            "label": "Bio",
                            "description": "This persons bio",
                            "weight": 9,
                            "type": "code",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "code_max_length": "-1",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        }
                    ]
                }
            ]
        },
        {
            "name": "gallery",
            "id": 12,
            "label": "Galleries",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "show_in_menu": "1",
            "label_singular": "Gallery",
            "public": "1",
            "show_ui": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "post",
            "capability_type_custom": "gallery",
            "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": "0",
            "supports_thumbnail": "0",
            "supports_excerpt": "0",
            "supports_trackbacks": "0",
            "supports_custom_fields": "0",
            "supports_comments": "0",
            "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",
            "menu_position": "0",
            "show_in_nav_menus": "1",
            "show_in_admin_bar": "1",
            "pfat_enable": "0",
            "pfat_append_single": "append",
            "pfat_filter_single": "the_content",
            "pfat_append_archive": "append",
            "pfat_filter_archive": "the_excerpt",
            "pfat_run_outside_loop": "0",
            "rest_enable": "0",
            "read_all": "0",
            "write_all": "0",
            "_migrated_28": "1",
            "groups": [
                {
                    "name": "main_fields",
                    "id": 90,
                    "label": "Main Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "aria_title",
                            "id": 13,
                            "label": "Aria Title",
                            "description": "The accessible aria title for the gallery",
                            "weight": 0,
                            "type": "text",
                            "required": "1",
                            "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_post_status": [
                                "publish"
                            ],
                            "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": "1",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "css_height",
                            "id": 14,
                            "label": "CSS Height",
                            "description": "The CSS string for the height of the gallery",
                            "weight": 1,
                            "type": "text",
                            "required": "1",
                            "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_post_status": [
                                "publish"
                            ],
                            "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": "1",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "gallery_photos",
                            "id": 15,
                            "label": "Gallery Photos",
                            "description": "The photos for the gallery",
                            "weight": 2,
                            "type": "pick",
                            "pick_object": "post_type",
                            "pick_val": "gallery_photo",
                            "required": "1",
                            "pick_format_type": "multi",
                            "pick_format_single": "dropdown",
                            "pick_format_multi": "list",
                            "pick_display_format_multi": "default",
                            "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_post_status": [
                                "publish"
                            ],
                            "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": "1",
                            "unique": "0"
                        }
                    ]
                }
            ]
        },
        {
            "name": "gallery_photo",
            "id": 16,
            "label": "Gallery Photos",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "show_in_menu": "1",
            "label_singular": "Gallery Photo",
            "public": "1",
            "show_ui": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "post",
            "capability_type_custom": "gallery_photo",
            "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": "0",
            "supports_thumbnail": "0",
            "supports_excerpt": "0",
            "supports_trackbacks": "0",
            "supports_custom_fields": "0",
            "supports_comments": "0",
            "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",
            "menu_position": "0",
            "show_in_nav_menus": "1",
            "show_in_admin_bar": "1",
            "pfat_enable": "0",
            "pfat_append_single": "append",
            "pfat_filter_single": "the_content",
            "pfat_append_archive": "append",
            "pfat_filter_archive": "the_excerpt",
            "pfat_run_outside_loop": "0",
            "rest_enable": "0",
            "read_all": "0",
            "write_all": "0",
            "built_in_taxonomies_wp_theme": "0",
            "_migrated_28": "1",
            "groups": [
                {
                    "name": "main_fields",
                    "id": 81,
                    "label": "Main Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "image",
                            "id": 17,
                            "label": "Image",
                            "description": "The image to show",
                            "weight": 0,
                            "type": "file",
                            "required": "1",
                            "file_format_type": "single",
                            "file_uploader": "attachment",
                            "file_attachment_tab": "upload",
                            "file_upload_dir": "wp",
                            "file_edit_title": "1",
                            "file_show_edit_link": "0",
                            "file_linked": "0",
                            "file_limit": "0",
                            "file_restrict_filesize": "10MB",
                            "file_type": "images",
                            "file_field_template": "rows",
                            "file_add_button": "Add File",
                            "file_modal_title": "Attach a file",
                            "file_modal_add_button": "Add File",
                            "file_wp_gallery_output": "0",
                            "file_wp_gallery_link": "post",
                            "file_wp_gallery_columns": "1",
                            "file_wp_gallery_random_sort": "0",
                            "file_wp_gallery_size": "thumbnail",
                            "pick_post_status": [
                                "publish"
                            ],
                            "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": "1",
                            "unique": "0"
                        },
                        {
                            "name": "duration",
                            "id": 18,
                            "label": "Duration",
                            "description": "How many seconds will this photo appear in the gallery? This will be overridden with the presenter settings if you choose to have one.",
                            "weight": 1,
                            "type": "number",
                            "required": "1",
                            "number_format_type": "number",
                            "number_format": "i18n",
                            "number_decimals": "0",
                            "number_format_soft": "0",
                            "number_step": "1",
                            "number_min": "0",
                            "number_max": "100",
                            "number_max_length": "12",
                            "pick_post_status": [
                                "publish"
                            ],
                            "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": "1",
                            "unique": "0",
                            "number_repeatable": "0"
                        }
                    ]
                }
            ]
        },
        {
            "name": "health_service",
            "id": 125,
            "label": "Health Services",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "label_singular": "Health Service",
            "public": "1",
            "show_ui": "1",
            "rest_enable": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "_migrated_28": "1",
            "required": "0",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "post",
            "capability_type_custom": "health_service",
            "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",
            "revisions_to_keep_limit": "0",
            "delete_with_user": "1",
            "groups": [
                {
                    "name": "main_fields",
                    "id": 126,
                    "label": "Main Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "display_title",
                            "id": 150,
                            "label": "Display Title",
                            "description": "The display title of this health service",
                            "weight": 0,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "description",
                            "id": 127,
                            "label": "Description",
                            "description": "The description of the health service",
                            "weight": 1,
                            "type": "code",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "code_max_length": "-1"
                        },
                        {
                            "name": "image",
                            "id": 134,
                            "label": "Image",
                            "description": "The decorative image for the health service",
                            "weight": 2,
                            "type": "file",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "file_format_type": "single",
                            "file_uploader": "attachment",
                            "file_attachment_tab": "upload",
                            "file_upload_dir": "wp",
                            "file_edit_title": "1",
                            "file_show_edit_link": "0",
                            "file_linked": "0",
                            "file_limit": "0",
                            "file_type": "images",
                            "file_field_template": "rows",
                            "file_add_button": "Add File",
                            "file_modal_title": "Attach a file",
                            "file_modal_add_button": "Add File",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "lists",
                            "id": 144,
                            "label": "Lists",
                            "description": "Lists of items for the health service",
                            "weight": 3,
                            "type": "pick",
                            "pick_object": "post_type",
                            "pick_val": "list",
                            "sister_id": "-- Select One --",
                            "post_status": "publish",
                            "pick_table": "-- Select One --",
                            "required": "0",
                            "pick_format_type": "multi",
                            "pick_format_single": "dropdown",
                            "pick_format_multi": "list",
                            "pick_display_format_multi": "default",
                            "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",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        }
                    ]
                }
            ]
        },
        {
            "name": "job_opening",
            "id": 156,
            "label": "Job Openings",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "label_singular": "Job Opening",
            "public": "1",
            "show_ui": "1",
            "rest_enable": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "_migrated_28": "1",
            "required": "0",
            "groups": [
                {
                    "name": "main_fields",
                    "id": 157,
                    "label": "Main Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "display_title",
                            "id": 184,
                            "label": "Display Title",
                            "description": "The title of the job to display",
                            "weight": 0,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "description",
                            "id": 158,
                            "label": "Description",
                            "description": "The job description",
                            "weight": 1,
                            "type": "code",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "code_max_length": "-1",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "close_date",
                            "id": 159,
                            "label": "Close Date",
                            "description": "The close date for applications",
                            "weight": 2,
                            "type": "date",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "date_type": "format",
                            "date_format": "mdy",
                            "date_allow_empty": "1",
                            "date_html5": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "qualifications",
                            "id": 160,
                            "label": "Qualifications",
                            "description": "What are the job qualifications",
                            "weight": 3,
                            "type": "pick",
                            "pick_object": "post_type",
                            "pick_val": "list",
                            "sister_id": "-- Select One --",
                            "post_status": "publish",
                            "pick_table": "-- Select One --",
                            "required": "0",
                            "pick_format_type": "single",
                            "pick_format_single": "dropdown",
                            "pick_format_multi": "checkbox",
                            "pick_display_format_multi": "default",
                            "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",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "location",
                            "id": 162,
                            "label": "Location",
                            "description": "What is the location for this job?",
                            "weight": 4,
                            "type": "pick",
                            "pick_object": "post_type",
                            "pick_val": "location",
                            "sister_id": "-- Select One --",
                            "post_status": "publish",
                            "pick_table": "-- Select One --",
                            "required": "0",
                            "pick_format_type": "single",
                            "pick_format_single": "dropdown",
                            "pick_format_multi": "checkbox",
                            "pick_display_format_multi": "default",
                            "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",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "job_site_url",
                            "id": 161,
                            "label": "Job Site URL",
                            "description": "If you have the job posted on a site like Indeed.com, you can paste the url here",
                            "weight": 5,
                            "type": "website",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "website_format": "normal",
                            "website_allow_port": "0",
                            "website_clickable": "0",
                            "website_new_window": "0",
                            "website_max_length": "255",
                            "website_html5": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "contact",
                            "id": 171,
                            "label": "Contact",
                            "description": "The contact person for this job opening",
                            "weight": 6,
                            "type": "pick",
                            "pick_object": "post_type",
                            "pick_val": "contact",
                            "sister_id": "-- Select One --",
                            "post_status": "publish",
                            "pick_table": "-- Select One --",
                            "required": "0",
                            "pick_format_type": "single",
                            "pick_format_single": "dropdown",
                            "pick_format_multi": "checkbox",
                            "pick_display_format_multi": "default",
                            "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",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        }
                    ]
                }
            ]
        },
        {
            "name": "list",
            "id": 139,
            "label": "Lists",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "label_singular": "List",
            "public": "1",
            "show_ui": "1",
            "rest_enable": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "_migrated_28": "1",
            "required": "0",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "post",
            "capability_type_custom": "list",
            "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",
            "revisions_to_keep_limit": "0",
            "delete_with_user": "1",
            "groups": [
                {
                    "name": "main_fields",
                    "id": 140,
                    "label": "Main Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "list",
                            "id": 141,
                            "label": "List",
                            "description": "The list of items",
                            "weight": 0,
                            "type": "paragraph",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "paragraph_allowed_html_tags": "strong em a ul ol li b i",
                            "paragraph_max_length": "-1",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "display_title",
                            "id": 147,
                            "label": "Display Title",
                            "description": "The title for the list to display",
                            "weight": 1,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "number_per_column",
                            "id": 154,
                            "label": "Number per column",
                            "description": "How many items per column should this list have?",
                            "weight": 2,
                            "type": "number",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "number_format_type": "number",
                            "number_format": "i18n",
                            "number_decimals": "0",
                            "number_format_soft": "0",
                            "number_step": "1",
                            "number_max_length": "12",
                            "number_html5": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "design_width",
                            "id": 155,
                            "label": "Design width",
                            "description": "What is the design width of this list? This is a css string, e.g. 33%, 60px, 50em",
                            "weight": 3,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        }
                    ]
                }
            ]
        },
        {
            "name": "location",
            "id": 83,
            "label": "Locations",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "label_singular": "Location",
            "public": "1",
            "show_ui": "1",
            "rest_enable": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "_migrated_28": "1",
            "required": "0",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "post",
            "capability_type_custom": "location",
            "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",
            "revisions_to_keep_limit": "0",
            "delete_with_user": "1",
            "groups": [
                {
                    "name": "main_fields",
                    "id": 84,
                    "label": "Main Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "display_title",
                            "id": 285,
                            "label": "Display Title",
                            "description": "The title for the location to display on webpages",
                            "weight": 0,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "nav_title",
                            "id": 113,
                            "label": "Nav Title",
                            "description": "This is a shortened version of the title the use in the navbar.",
                            "weight": 1,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "gmap_address_zoom": "12",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "url_slug",
                            "id": 114,
                            "label": "URL Slug",
                            "description": "This should be a dash-delimited short string to use in a url",
                            "weight": 2,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "gmap_address_zoom": "12",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "address",
                            "id": 85,
                            "label": "Address",
                            "description": "This is the address of the location. The google map you see will be the same map that the user sees on the webpage.",
                            "weight": 3,
                            "type": "gmapaddress",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "gmap_address_type": "address",
                            "gmap_address_address_state_input": "text",
                            "gmap_address_address_country_input": "text",
                            "gmap_address_autocorrect": "0",
                            "gmap_address_show_map_input": "1",
                            "gmap_address_default_lat": "37.773972",
                            "gmap_address_default_lng": "-122.431297",
                            "gmap_address_display_type": "address-map",
                            "gmap_address_style": "static",
                            "gmap_address_type_of_map": "roadmap",
                            "gmap_address_zoom": "12",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "gmap_address_address_line_1": "1",
                            "gmap_address_address_line_2": "1",
                            "gmap_address_address_city": "1",
                            "gmap_address_address_state": "1",
                            "gmap_address_address_zip": "1",
                            "gmap_address_default_zoom": "10"
                        },
                        {
                            "name": "phone_number",
                            "id": 86,
                            "label": "Phone Number",
                            "description": "What's the phone number for this location?",
                            "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",
                            "gmap_address_zoom": "12",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "fax_number",
                            "id": 87,
                            "label": "Fax Number",
                            "description": "What's the fax number for this location?",
                            "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",
                            "gmap_address_zoom": "12",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "description",
                            "id": 112,
                            "label": "Description",
                            "description": "The description of the location",
                            "weight": 6,
                            "type": "code",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "gmap_address_zoom": "12",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "code_max_length": "-1"
                        },
                        {
                            "name": "sunday_hours",
                            "id": 115,
                            "label": "Sunday Hours",
                            "description": "Hours for Sunday",
                            "weight": 7,
                            "type": "timerange",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "monday_hours",
                            "id": 116,
                            "label": "Monday Hours",
                            "description": "Hours for Monday",
                            "weight": 8,
                            "type": "timerange",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "tuesday_hours",
                            "id": 117,
                            "label": "Tuesday Hours",
                            "description": "Hours for Tuesday",
                            "weight": 9,
                            "type": "timerange",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "wednesday_hours",
                            "id": 118,
                            "label": "Wednesday Hours",
                            "description": "Hours for Wednesday",
                            "weight": 10,
                            "type": "timerange",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "thursday_hours",
                            "id": 119,
                            "label": "Thursday Hours",
                            "description": "Hours for Thursday",
                            "weight": 11,
                            "type": "timerange",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "friday_hours",
                            "id": 120,
                            "label": "Friday Hours",
                            "description": "Hours for Friday",
                            "weight": 12,
                            "type": "timerange",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "saturday_hours",
                            "id": 121,
                            "label": "Saturday Hours",
                            "description": "Hours for Saturday",
                            "weight": 13,
                            "type": "timerange",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        }
                    ]
                }
            ]
        },
        {
            "name": "team",
            "id": 254,
            "label": "Teams",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "label_singular": "Team",
            "public": "1",
            "show_ui": "1",
            "rest_enable": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "_migrated_28": "1",
            "required": "0",
            "show_in_menu": "1",
            "menu_position": "0",
            "show_in_nav_menus": "1",
            "show_in_admin_bar": "1",
            "groups": [
                {
                    "name": "main_fields",
                    "id": 255,
                    "label": "Main Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "display_title",
                            "id": 256,
                            "label": "Display Title",
                            "description": "What's the title to display on the webpage for this team?",
                            "weight": 0,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "nav_title",
                            "id": 284,
                            "label": "Nav Title",
                            "description": "The title that will show up in the menus",
                            "weight": 1,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "url_slug",
                            "id": 257,
                            "label": "URL Slug",
                            "description": "What's the url navigation slug for this field? e.g. behavioral-health",
                            "weight": 2,
                            "type": "text",
                            "sister_id": "-- Select One --",
                            "required": "1",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "menu_position",
                            "id": 289,
                            "label": "Menu position",
                            "description": "What's the menu position of this item? The items will be ordered according to this number. The lowest number will be at the start of the menu, and the highest will be at the end.",
                            "weight": 3,
                            "type": "number",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "number_format_type": "number",
                            "number_format": "i18n",
                            "number_decimals": "0",
                            "number_format_soft": "0",
                            "number_step": "1",
                            "number_max_length": "12",
                            "number_html5": "0"
                        },
                        {
                            "name": "description",
                            "id": 258,
                            "label": "Description",
                            "description": "Describe this team",
                            "weight": 4,
                            "type": "code",
                            "sister_id": "-- Select One --",
                            "required": "0",
                            "code_max_length": "-1",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        },
                        {
                            "name": "contacts",
                            "id": 268,
                            "label": "Contacts",
                            "description": "What people belong to this team?",
                            "weight": 5,
                            "type": "pick",
                            "pick_object": "post_type",
                            "pick_val": "contact",
                            "sister_id": "266",
                            "post_status": "publish",
                            "pick_table": "-- Select One --",
                            "required": "1",
                            "pick_format_type": "multi",
                            "pick_format_single": "dropdown",
                            "pick_format_multi": "list",
                            "pick_display_format_multi": "default",
                            "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",
                            "roles_allowed": "administrator",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1"
                        }
                    ]
                }
            ]
        }
    ]
}
@sc0ttkclark
Copy link
Member

@alex-icstech Can you provide further details about what the value "pod_code" is and why it was associated to a non-Pod post?

@sc0ttkclark sc0ttkclark modified the milestones: Pods 2.8.10, Pods 2.8.11 Feb 2, 2022
@sc0ttkclark sc0ttkclark modified the milestones: Pods 2.8.11, Pods 2.8.12 Feb 21, 2022
@sc0ttkclark sc0ttkclark modified the milestones: Pods 2.8.12, Pods 2.8.13, Pods 2.8.14, Pods 2.8.15 Apr 8, 2022
@sc0ttkclark sc0ttkclark modified the milestones: Pods 2.8.17, Pods 2.8.19 May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants