Support

Account

Home Forums Backend Issues (wp-admin) Problem while saving a Flexible content

Solving

Problem while saving a Flexible content

  • hi,

    I’m experiencing a problem while saving a Flexible content via the admin. Version: 5.3.1

    Screenshot: http://i.imgur.com/XVPqJcg.png

    Error message: Warning: Illegal string offset ‘acf_fc_layout’ in […path…]src\web\app\plugins\advanced-custom-fields-pro\pro\fields\flexible-content.php on line 232

    Configuration:

    
    {
        "key": "group_563cdc8b56cf9",
        "title": "Homepage Header",
        "fields": [
            {
                "key": "field_563cdce7e27c5",
                "label": "Slides",
                "name": "slides",
                "type": "flexible_content",
                "instructions": "",
                "required": 1,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "button_label": "Add Slide",
                "min": "",
                "max": "",
                "layouts": [
                    {
                        "key": "563cdcf75ddd8",
                        "name": "image_slide",
                        "label": "Image Slide",
                        "display": "row",
                        "sub_fields": [
                            {
                                "key": "field_563cdddae27c6",
                                "label": "Title",
                                "name": "title",
                                "type": "text",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563cdde8e27c7",
                                "label": "Subtitle",
                                "name": "subtitle",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_5640fb89a211d",
                                "label": "Image",
                                "name": "image",
                                "type": "image",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "return_format": "array",
                                "preview_size": "thumbnail",
                                "library": "all",
                                "min_width": "",
                                "min_height": "",
                                "min_size": "",
                                "max_width": "",
                                "max_height": "",
                                "max_size": "",
                                "mime_types": ""
                            }
                        ],
                        "min": "",
                        "max": ""
                    },
                    {
                        "key": "563cde97503c8",
                        "name": "video_slide",
                        "label": "Video Slide",
                        "display": "row",
                        "sub_fields": [
                            {
                                "key": "field_563cdea1503c9",
                                "label": "Title",
                                "name": "title",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563cdeb6a7471",
                                "label": "Subtitle",
                                "name": "subtitle",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563cdec0a7472",
                                "label": "Video URL",
                                "name": "video_url",
                                "type": "url",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": ""
                            }
                        ],
                        "min": "",
                        "max": ""
                    }
                ]
            }
        ],
        "location": [
            [
                {
                    "param": "page_template",
                    "operator": "==",
                    "value": "page-home.php"
                }
            ]
        ],
        "menu_order": 0,
        "position": "normal",
        "style": "default",
        "label_placement": "top",
        "instruction_placement": "label",
        "hide_on_screen": [
            "the_content"
        ],
        "active": 1,
        "description": "",
        "modified": 1447099316
    }
  • The field group you posted doesn’t seem to match the image you linked to.

    Try updating to 5.3.2 and see if you’re still seeing this error.

  • I’ll try to update.

    Right, there’s another flexible type for the page:

    
    {
        "key": "group_563d1d37c374d",
        "title": "Content Cards",
        "fields": [
            {
                "key": "field_563d1d62fc0b2",
                "label": "Cards",
                "name": "cards",
                "type": "flexible_content",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "button_label": "Add Card",
                "min": "",
                "max": "",
                "layouts": [
                    {
                        "key": "563d1d9a9dace",
                        "name": "image_card",
                        "label": "Image Card",
                        "display": "block",
                        "sub_fields": [
                            {
                                "key": "field_563d1db4fc0b3",
                                "label": "Image",
                                "name": "image",
                                "type": "image",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "return_format": "array",
                                "preview_size": "thumbnail",
                                "library": "all",
                                "min_width": "",
                                "min_height": "",
                                "min_size": "",
                                "max_width": "",
                                "max_height": "",
                                "max_size": "",
                                "mime_types": ""
                            },
                            {
                                "key": "field_563d1f8874ea4",
                                "label": "Image Size",
                                "name": "image_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "full-image": "Full",
                                    "half-image": "Half"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "full-image",
                                "layout": "horizontal"
                            },
                            {
                                "key": "field_563d1e3bfc0b4",
                                "label": "Title",
                                "name": "",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d1e5a74ea2",
                                "label": "Subtitle",
                                "name": "subtitle",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d1e7674ea3",
                                "label": "Card Size",
                                "name": "card_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "layout-half": "Wide",
                                    "layout-fourth": "Narrow"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "layout-fourth : Narrow",
                                "layout": "horizontal"
                            },
                            {
                                "key": "field_563d20b02daba",
                                "label": "Action",
                                "name": "",
                                "type": "flexible_content",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "button_label": "Add Action",
                                "min": "",
                                "max": "",
                                "layouts": [
                                    {
                                        "key": "563d20caa9985",
                                        "name": "external_link",
                                        "label": "External Link",
                                        "display": "block",
                                        "sub_fields": [
                                            {
                                                "key": "field_563d20e9f4a5d",
                                                "label": "URL",
                                                "name": "url",
                                                "type": "url",
                                                "instructions": "",
                                                "required": 0,
                                                "conditional_logic": 0,
                                                "wrapper": {
                                                    "width": "",
                                                    "class": "",
                                                    "id": ""
                                                },
                                                "default_value": "",
                                                "placeholder": ""
                                            },
                                            {
                                                "key": "field_563d21d8f4a6e",
                                                "label": "URL",
                                                "name": "url",
                                                "type": "url",
                                                "instructions": "",
                                                "required": 0,
                                                "conditional_logic": 0,
                                                "wrapper": {
                                                    "width": "",
                                                    "class": "",
                                                    "id": ""
                                                },
                                                "default_value": "",
                                                "placeholder": ""
                                            }
                                        ],
                                        "min": "",
                                        "max": ""
                                    },
                                    {
                                        "key": "563d210af4a5e",
                                        "name": "internal_link",
                                        "label": "Internal Link",
                                        "display": "block",
                                        "sub_fields": [
                                            {
                                                "key": "field_563d2119f4a5f",
                                                "label": "Content Reference",
                                                "name": "content_reference",
                                                "type": "relationship",
                                                "instructions": "",
                                                "required": 0,
                                                "conditional_logic": 0,
                                                "wrapper": {
                                                    "width": "",
                                                    "class": "",
                                                    "id": ""
                                                },
                                                "post_type": [],
                                                "taxonomy": [],
                                                "filters": [
                                                    "search",
                                                    "post_type"
                                                ],
                                                "elements": "",
                                                "min": "",
                                                "max": "",
                                                "return_format": "object"
                                            },
                                            {
                                                "key": "field_563d21d8f4a6f",
                                                "label": "Content Reference",
                                                "name": "content_reference",
                                                "type": "relationship",
                                                "instructions": "",
                                                "required": 0,
                                                "conditional_logic": 0,
                                                "wrapper": {
                                                    "width": "",
                                                    "class": "",
                                                    "id": ""
                                                },
                                                "post_type": [],
                                                "taxonomy": [],
                                                "filters": [
                                                    "search",
                                                    "post_type"
                                                ],
                                                "elements": "",
                                                "min": "",
                                                "max": "",
                                                "return_format": "object"
                                            }
                                        ],
                                        "min": "",
                                        "max": ""
                                    }
                                ]
                            }
                        ],
                        "min": "",
                        "max": ""
                    },
                    {
                        "key": "563d203e2dab3",
                        "name": "video_card",
                        "label": "Video Card",
                        "display": "block",
                        "sub_fields": [
                            {
                                "key": "field_563d205a2dab9",
                                "label": "Video URL",
                                "name": "video_url",
                                "type": "url",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": ""
                            },
                            {
                                "key": "field_563d203e2dab4",
                                "label": "Image",
                                "name": "image",
                                "type": "image",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "return_format": "array",
                                "preview_size": "thumbnail",
                                "library": "all",
                                "min_width": "",
                                "min_height": "",
                                "min_size": "",
                                "max_width": "",
                                "max_height": "",
                                "max_size": "",
                                "mime_types": ""
                            },
                            {
                                "key": "field_563d203e2dab5",
                                "label": "Image Size",
                                "name": "image_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "full-image": "Full",
                                    "half-image": "Half"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "full-image",
                                "layout": "horizontal"
                            },
                            {
                                "key": "field_563d203e2dab6",
                                "label": "Title",
                                "name": "",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d203e2dab7",
                                "label": "Subtitle",
                                "name": "subtitle",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d203e2dab8",
                                "label": "Card Size",
                                "name": "card_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "layout-half": "Wide",
                                    "layout-fourth": "Narrow"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "layout-fourth : Narrow",
                                "layout": "horizontal"
                            }
                        ],
                        "min": "",
                        "max": ""
                    },
                    {
                        "key": "563d21d8f4a67",
                        "name": "cta_card",
                        "label": "CTA Card",
                        "display": "block",
                        "sub_fields": [
                            {
                                "key": "field_563d21d8f4a6a",
                                "label": "Title",
                                "name": "",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d21d8f4a6b",
                                "label": "Subtitle",
                                "name": "subtitle",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d21d8f4a6c",
                                "label": "Card Size",
                                "name": "card_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "layout-half": "Wide",
                                    "layout-fourth": "Narrow"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "layout-fourth : Narrow",
                                "layout": "horizontal"
                            },
                            {
                                "key": "field_563d21d8f4a6d",
                                "label": "Action",
                                "name": "",
                                "type": "flexible_content",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "button_label": "Add Action",
                                "min": "",
                                "max": "",
                                "layouts": [
                                    {
                                        "key": "563d20caa9985",
                                        "name": "external_link",
                                        "label": "External Link",
                                        "display": "block",
                                        "sub_fields": [],
                                        "min": "",
                                        "max": ""
                                    },
                                    {
                                        "key": "563d210af4a5e",
                                        "name": "internal_link",
                                        "label": "Internal Link",
                                        "display": "block",
                                        "sub_fields": [],
                                        "min": "",
                                        "max": ""
                                    }
                                ]
                            }
                        ],
                        "min": "",
                        "max": ""
                    }
                ]
            }
        ],
        "location": [
            [
                {
                    "param": "page_template",
                    "operator": "==",
                    "value": "page-home.php"
                }
            ]
        ],
        "menu_order": 2,
        "position": "normal",
        "style": "default",
        "label_placement": "top",
        "instruction_placement": "label",
        "hide_on_screen": [
            "the_content"
        ],
        "active": 1,
        "description": "",
        "modified": 1446847034
    }
    
  • Can you attache that field group instead on putting it into the editor? You may need to put it in a .zip file. If you do that and you’re still having a problem, if you attach it I can give it a quick test and see if it’s causing an error for me.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Problem while saving a Flexible content’ is closed to new replies.