Support

Account

Forum Replies Created

  • not sure if that is how I should have shared it. Haven’t updated yet but hopefully will later today. You can see under the ‘call_to_action_buttons’ repeater there is the 1xselect box and 2xtext fields and the text field ‘button_url’ has the conditional relating to the value of the ‘button_type’ select box.

  • {
        "key": "group_570454af8e9ab",
        "title": "Call to action",
        "fields": [
            {
                "key": "field_570454b47c022",
                "label": "Call to action title",
                "name": "call_to_action_title",
                "type": "text",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "default_value": "",
                "placeholder": "Call to action title",
                "prepend": "",
                "append": "",
                "maxlength": "",
                "readonly": 0,
                "disabled": 0
            },
            {
                "key": "field_570454c77c023",
                "label": "Call to action description",
                "name": "call_to_action_description",
                "type": "textarea",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "default_value": "",
                "placeholder": "Call to action description",
                "maxlength": "",
                "rows": "",
                "new_lines": "wpautop",
                "readonly": 0,
                "disabled": 0
            },
            {
                "key": "field_570454e27c024",
                "label": "Call to action image",
                "name": "call_to_action_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_570454f37c025",
                "label": "Call to action image URL",
                "name": "call_to_action_image_url",
                "type": "url",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "default_value": "",
                "placeholder": "Call to action image URL"
            },
            {
                "key": "field_5704550c7c026",
                "label": "Call to action buttons",
                "name": "call_to_action_buttons",
                "type": "repeater",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "collapsed": "",
                "min": "",
                "max": 3,
                "layout": "table",
                "button_label": "Add Button",
                "sub_fields": [
                    {
                        "key": "field_570455267c027",
                        "label": "Button type",
                        "name": "button_type",
                        "type": "select",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "choices": {
                            "external-url": "External URL",
                            "phone-number": "Phone number",
                            "enquiry-form": "Enquiry form",
                            "enquiry-form-address": "Enquiry form with address"
                        },
                        "default_value": [],
                        "allow_null": 0,
                        "multiple": 0,
                        "ui": 0,
                        "ajax": 0,
                        "placeholder": "",
                        "disabled": 0,
                        "readonly": 0
                    },
                    {
                        "key": "field_5704556c7c028",
                        "label": "Button label",
                        "name": "button_label",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Button label",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455797c029",
                        "label": "Button URL",
                        "name": "button_url",
                        "type": "url",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": [
                            [
                                {
                                    "field": "field_570455267c027",
                                    "operator": "==",
                                    "value": "external-url"
                                }
                            ]
                        ],
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Button URL"
                    }
                ]
            },
            {
                "key": "field_5704559b0e24e",
                "label": "Call to action products",
                "name": "call_to_action_products",
                "type": "repeater",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "collapsed": "",
                "min": "",
                "max": "",
                "layout": "table",
                "button_label": "Add Product",
                "sub_fields": [
                    {
                        "key": "field_570455b20e24f",
                        "label": "Title",
                        "name": "title",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Title",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455b90e250",
                        "label": "Description",
                        "name": "description",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Description",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455c30e251",
                        "label": "Price",
                        "name": "price",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Price",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455ce0e252",
                        "label": "Button label",
                        "name": "button_label",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Button label",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455dd0e253",
                        "label": "Button URL",
                        "name": "button_url",
                        "type": "url",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Button URL"
                    }
                ]
            }
        ],
        "location": [
            [
                {
                    "param": "user_role",
                    "operator": "==",
                    "value": "all"
                },
                {
                    "param": "user_form",
                    "operator": "==",
                    "value": "edit"
                }
            ]
        ],
        "menu_order": 0,
        "position": "normal",
        "style": "default",
        "label_placement": "top",
        "instruction_placement": "label",
        "hide_on_screen": "",
        "active": 1,
        "description": "",
        "modified": 1460002594
    }
  • I found a manual fix for anyone that is having the same problem and their plugins are handled through something external to wordpress.

    I basically activated the new version. Deleted everything that had appeared in the new version field groups. Run

    UPDATE wp_options SET option_value = ‘4.4.5’ WHERE option_name = ‘acf_version’

    on the database.
    Replace ‘4.4.5’ with whatever previous version you were running. Seems like a much easier solution than the manual edited script and runs through the actual update process expected by the plugin.

  • Did the clean install and got the upgrade database option… Annoying! Not sure why I am not getting it.

  • I am using version 5.3.6.1 of the acf PRO.

    Also I am using Version 4.4.2 of wordpress.

  • I reverted my database back to v4 so everything is back to original. I followed the steps in ‘https://www.advancedcustomfields.com/resources/upgrading-v4-v5/’ and all goes fine and I activate v5 but I am just never prompted to upgrade the database? Where should the prompt appear and what should it look like? All the update field information makes sense. Just would like to get a clean install to make sure I can replicate on the live environment without any problems when I decide to move that to v5.

  • I talked to whoever set the environment up here and we have define(‘AUTOMATIC_UPDATER_DISABLED’, true); in config which I think will fix the issue if I disable this. It should allow me to update. I will test this soon and let you know.

  • My get_acf_key() function looks like:

    function get_acf_key($field_name) {
    global $wpdb;

    return $wpdb->get_var(”
    SELECT meta_key
    FROM $wpdb->postmeta
    WHERE meta_key LIKE ‘field_%’ AND meta_value LIKE ‘%$field_name%’ ORDER BY meta_key DESC;
    “);
    }

    I am aware this can cause problems if two fields have the same name however I am making sure that they aren’t on my end. And this helps with possible inconsistencies in keys between different environments which lets me just use the same naming. The problem is in the database there are now duplicates of the fields after running the import script from the other post. The duplicates don’t show in the backend however, only in the database. So the script appeared to import the fields into the new structure but left the old meta data still there. I am not sure what to do about this. It would be good if there was a manual update available that would update to the new version and clean the old data out.

  • I believe the syntax has changed to just pass the acf field name now? As that appears to work for me.

    e.g.
    update_field(‘dob’, $dobVal, ‘user_’ . $user_id);

    instead of

    update_field(get_acf_key(‘dob’), $dobVal, ‘user_’ . $user_id);

  • This seemed to work and imported my old fields across to the new setup.

    One final thing that is not working now is the way I am updating the fields previously.

    e.g.
    update_field(get_acf_key(‘dob’), $dobVal, ‘user_’ . $user_id);

    Has this changed? Also ‘get_acf_key()’ is a custom function which returns the key of the acf field e.g. ‘field_56ceaffe771d0’

    Thanks.

  • Is there a way to manually initiate this database update because we are using composer to handle the plugin updates which just basically replaces the files and doesn’t do a ‘traditional’ update in wordpress?

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