pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.06k stars 265 forks source link

API not showing custom fields on v3.2.2 #7318

Open danielcharrua opened 1 week ago

danielcharrua commented 1 week ago

Description

The custom fields are not shown on the REST API when globally options are set.

In previous versions I had global options enabled to show all fields (read and write) and this was working OK.

Captura de pantalla 2024-06-26 a las 8 38 32

I do some basic testing and activate this options per-filed and they appeared. Maybe something was broken in global options por the pod.

Version

3.2.2

Testing Instructions

  1. Update to 3.2.2
  2. Make sure you have the global options on the CPT to READ/WRITE as the image on description shows
  3. Make an API call to any CPT
  4. You'll see no custom fields on the API response

Screenshots / Screencast

No response

Possible Workaround

No response

Site Health Information

No response

Pods Package

{
    "@meta": {
        "version": "3.2.1.1",
        "build": 1719384260
    },
    "settings": {
        "types_only": "0",
        "watch_changed_fields": "1",
        "metadata_integration": "1",
        "metadata_override_get": "1",
        "register_meta_integration": "0",
        "media_modal_fields": "1",
        "session_auto_start": "0",
        "dynamic_features_allow": "1",
        "dynamic_features_enabled": [
            "display",
            "form"
        ],
        "show_access_restricted_messages": "0",
        "show_access_admin_notices": "1",
        "dynamic_features_allow_sql_clauses": "simple",
        "display_callbacks": "restricted",
        "display_callbacks_allowed": "esc_attr,esc_html",
        "wisdom_opt_out": "1",
        "active_components": [
            "migrate-packages",
            "templates"
        ]
    },
    "pods": [
        {
            "name": "vessel",
            "id": 28,
            "label": "Vessels",
            "description": "",
            "label_singular": "Vessel",
            "public": "1",
            "show_ui": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "type": "post_type",
            "storage": "meta",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "post",
            "capability_type_custom": "vessel",
            "capability_type_extra": "1",
            "has_archive": "1",
            "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": "1",
            "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",
            "show_in_menu": "1",
            "menu_position": "0",
            "show_in_nav_menus": "1",
            "show_in_admin_bar": "1",
            "pfat_enable": "0",
            "pfat_run_outside_loop": "0",
            "pfat_append_single": "append",
            "pfat_filter_single": "the_content",
            "pfat_append_archive": "append",
            "pfat_filter_archive": "the_content",
            "rest_enable": "1",
            "read_all": "1",
            "write_all": "1",
            "built_in_taxonomies_vessel_type": "1",
            "_migrated_28": "1",
            "dynamic_features_allow": "inherit",
            "restrict_dynamic_features": "1",
            "restricted_dynamic_features": [
                "display",
                "form"
            ],
            "read_all_access": "1",
            "rest_api_field_mode": "value",
            "rest_api_field_location": "object",
            "groups": [
                {
                    "name": "more_fields",
                    "id": 15264,
                    "label": "More Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "vessel_id",
                            "id": 54,
                            "label": "VesselID",
                            "description": "Vessel Compass ID",
                            "weight": 0,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "default_evaluate_tags": "0",
                            "default_empty_fields": "0",
                            "revisions_revision_field": "0",
                            "enable_conditional_logic": "0",
                            "rest_read_access": "1"
                        },
                        {
                            "name": "bsb_ref",
                            "id": 29,
                            "label": "Reference",
                            "description": "BSB internal ref. (maps Custom1)",
                            "weight": 1,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "1",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "bhp",
                            "id": 32,
                            "label": "BHP",
                            "description": "Engine power HP",
                            "weight": 2,
                            "type": "number",
                            "required": "0",
                            "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",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "number_repeatable": "0"
                        },
                        {
                            "name": "beam",
                            "id": 33,
                            "label": "Beam",
                            "description": "Breadth (m)",
                            "weight": 3,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "built_country",
                            "id": 35,
                            "label": "BuiltCountry",
                            "description": "Built Country",
                            "weight": 4,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "built_year",
                            "id": 36,
                            "label": "BuiltYear",
                            "description": "Built Year",
                            "weight": 5,
                            "type": "number",
                            "required": "0",
                            "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",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "number_repeatable": "0"
                        },
                        {
                            "name": "class",
                            "id": 37,
                            "label": "Class",
                            "description": "Class",
                            "weight": 6,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "class_notation",
                            "id": 38,
                            "label": "ClassNotation",
                            "description": "Class Notation",
                            "weight": 7,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "dwt",
                            "id": 40,
                            "label": "DWT",
                            "description": "DWT (tons)",
                            "weight": 8,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "deck_space",
                            "id": 41,
                            "label": "Deck Space",
                            "description": "Deck Cargo (tons)",
                            "weight": 9,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "draft",
                            "id": 43,
                            "label": "Draft",
                            "description": "Draft",
                            "weight": 10,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "dry_dock_date",
                            "id": 44,
                            "label": "DryDockDate",
                            "description": "Dry Dock Date (Next DD)",
                            "weight": 11,
                            "type": "datetime",
                            "required": "0",
                            "datetime_type": "format",
                            "datetime_format": "mdy",
                            "datetime_time_type": "12",
                            "datetime_time_format": "h_mma",
                            "datetime_time_format_24": "hh_mm",
                            "datetime_allow_empty": "1",
                            "datetime_html5": "0",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "datetime_repeatable": "0"
                        },
                        {
                            "name": "engine_manufacturer",
                            "id": 45,
                            "label": "EngineManufacturer",
                            "description": "Engine Manufacturer",
                            "weight": 12,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "engine_model",
                            "id": 46,
                            "label": "EngineModel",
                            "description": "Engine Model",
                            "weight": 13,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "fo_cap",
                            "id": 48,
                            "label": "FOCap",
                            "description": "Fuel tanks capacity (m3)",
                            "weight": 14,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "fw_cap",
                            "id": 49,
                            "label": "FWCap",
                            "description": "Fresh Water tanks capacity (m3)",
                            "weight": 15,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "flag",
                            "id": 50,
                            "label": "Flag",
                            "description": "Flag",
                            "weight": 16,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "gt",
                            "id": 51,
                            "label": "GT",
                            "description": "GT (tons)",
                            "weight": 17,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "generator",
                            "id": 52,
                            "label": "Generator",
                            "description": "Auxiliary engine(s)",
                            "weight": 18,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "hull_material",
                            "id": 55,
                            "label": "Hull material",
                            "description": "Hull material (maps Custom2)",
                            "weight": 19,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "main_propulsion_system",
                            "id": 56,
                            "label": "Main Propulsion System",
                            "description": "Main Propulsion System (maps Custom3)",
                            "weight": 20,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "loa",
                            "id": 58,
                            "label": "LOA",
                            "description": "Length (m)",
                            "weight": 21,
                            "type": "number",
                            "required": "0",
                            "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",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "number_repeatable": "0"
                        },
                        {
                            "name": "nt",
                            "id": 60,
                            "label": "NT",
                            "description": "NT (tons)",
                            "weight": 22,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "number_of_screws",
                            "id": 62,
                            "label": "NumberOfScrews",
                            "description": "Propellers",
                            "weight": 23,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "our_position",
                            "id": 63,
                            "label": "OurPosition",
                            "description": "Our Position",
                            "weight": 24,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "sale_status",
                            "id": 65,
                            "label": "Sale Status",
                            "description": "Sale Status",
                            "weight": 25,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "spec_survey_date",
                            "id": 67,
                            "label": "SpecSurveyDate",
                            "description": "Spec Survey Date (Next SS)",
                            "weight": 26,
                            "type": "datetime",
                            "required": "0",
                            "datetime_type": "format",
                            "datetime_format": "mdy",
                            "datetime_time_type": "12",
                            "datetime_time_format": "h_mma",
                            "datetime_time_format_24": "hh_mm",
                            "datetime_allow_empty": "1",
                            "datetime_html5": "0",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "datetime_repeatable": "0"
                        },
                        {
                            "name": "speed_max",
                            "id": 68,
                            "label": "Speed2",
                            "description": "Speed (knots)",
                            "weight": 27,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "sub_type",
                            "id": 69,
                            "label": "SubType",
                            "description": "Sub Type",
                            "weight": 28,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "technical_comments",
                            "id": 70,
                            "label": "TechnicalComments",
                            "description": "Technical Comments (additional info)",
                            "weight": 29,
                            "type": "wysiwyg",
                            "required": "0",
                            "wysiwyg_editor": "tinymce",
                            "wysiwyg_media_buttons": "1",
                            "wysiwyg_oembed": "0",
                            "wysiwyg_wptexturize": "1",
                            "wysiwyg_convert_chars": "1",
                            "wysiwyg_wpautop": "1",
                            "wysiwyg_allow_shortcode": "0",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "wysiwyg_repeatable": "0"
                        },
                        {
                            "name": "deck_area",
                            "id": 79,
                            "label": "Deck Area",
                            "description": "Deck Area",
                            "weight": 30,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "deck_load",
                            "id": 80,
                            "label": "Deck Load",
                            "description": "Deck Load",
                            "weight": 31,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "depth",
                            "id": 81,
                            "label": "Depth",
                            "description": "Depth",
                            "weight": 32,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "ballast_cap",
                            "id": 82,
                            "label": "BallastCap",
                            "description": "Ballast Capacity",
                            "weight": 33,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "lbp",
                            "id": 83,
                            "label": "LBP",
                            "description": "LBP",
                            "weight": 34,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "next_annual_survey",
                            "id": 84,
                            "label": "DateContSurvey",
                            "description": "Next Annual Survey",
                            "weight": 35,
                            "type": "datetime",
                            "required": "0",
                            "datetime_type": "format",
                            "datetime_format": "mdy",
                            "datetime_time_type": "12",
                            "datetime_time_format": "h_mma",
                            "datetime_time_format_24": "hh_mm",
                            "datetime_allow_empty": "1",
                            "datetime_html5": "0",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "datetime_repeatable": "0"
                        },
                        {
                            "name": "speed_cruising",
                            "id": 85,
                            "label": "Speed",
                            "description": "Speed (Knots)",
                            "weight": 36,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "has_valuation",
                            "id": 86,
                            "label": "HasValuation",
                            "description": "Has Valuation",
                            "weight": 37,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "valuation_currency",
                            "id": 87,
                            "label": "ValuationCurrency",
                            "description": "Valuation Currency",
                            "weight": 38,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "valuation_price",
                            "id": 88,
                            "label": "ValuationPrice",
                            "description": "Valuation Price",
                            "weight": 39,
                            "type": "number",
                            "required": "0",
                            "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",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "number_repeatable": "0"
                        },
                        {
                            "name": "main_image",
                            "id": 7105,
                            "label": "Main Image",
                            "description": "Main Image",
                            "weight": 40,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "engines_number",
                            "id": 9295,
                            "label": "Engines Number",
                            "description": "Number of engines",
                            "weight": 41,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "location",
                            "id": 9618,
                            "label": "Location",
                            "description": "Location",
                            "weight": 42,
                            "type": "text",
                            "required": "0",
                            "text_allow_shortcode": "0",
                            "text_allow_html": "0",
                            "text_allowed_html_tags": "strong em a ul ol li b i",
                            "text_max_length": "255",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "text_repeatable": "0"
                        },
                        {
                            "name": "updated_at",
                            "id": 11958,
                            "label": "Updated at",
                            "description": "Laravel updated_at db field",
                            "weight": 43,
                            "type": "datetime",
                            "required": "0",
                            "datetime_type": "format",
                            "datetime_format": "mdy",
                            "datetime_time_type": "12",
                            "datetime_time_format": "h_mma",
                            "datetime_time_format_24": "hh_mm",
                            "datetime_allow_empty": "1",
                            "datetime_html5": "0",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "2",
                            "unique": "0",
                            "datetime_repeatable": "0"
                        }
                    ]
                }
            ]
        }
    ]
}
drikusroor commented 4 days ago

I get the same issue on my website with the following setup:

I can also confirm custom field values were returned in the REST API endpoints in the previous Pods version v.3.2.1.

Maybe it has something to do with this new feature? https://github.com/pods-framework/pods/pull/7285/commits/7b2322b9842e8d1e5dcb715a884ce88b8f466ecf

I did a bit of snooping around and I suspect something goes wrong at this point:

https://github.com/pods-framework/pods/blob/2f8ab6586e5015c1eaf4ccf50cb6e223c0cdf2e5/classes/PodsRESTFields.php#L247-L250

While this setting is set to true in my Pods admin interface, the value of $can_use_mode_has_value is false or null-ish, thereby restricting read access to all custom fields.

Update:

Apparently I had to set every individual Pod's field's Read via REST API value to true. I did not have to do this before. It's kind of a breaking change in that sense and begs the question why the release notes did not mention this.

@danielcharrua Can you confirm this works for you as well?

@sc0ttkclark Could you maybe mention or reference this issue in the release notes of v3.2.2? :-)

afbeelding

sc0ttkclark commented 4 days ago

Looking at this for the release this week

pavodev commented 3 days ago

Noticed the same issue today after upgrading to 3.2.2. Tried @drikusroor's fix but in my case the relationship field isn't returned in the API response even after setting the "Read via REST API" field to "Yes"