Support

Account

Home Forums Bug Reports missing flexible fields in acf/update_value

Solving

missing flexible fields in acf/update_value

  • Hi,
    I’m trying to get the content of a flexible field before saving it into the database.
    to do that I’m using the following filter:

    function check_flexible_fields( $value, $postid, $field  ) {
    	error_log( print_r($value,true) );
    	return $value;
    }
    add_filter('acf/update_value/name=my_flexible_field', 'check_flexible_fields', 10, 3);

    the error_log function prints only the following text:

    Array
    (
        [0] => my_custom_layout
        [1] => my_custom_layout
    )

    where my_custom_layout is one layout that I’ve created inside the Flexible content field.

    BUT, if I use the following filter:

    function check_flexible_fields( $value, $postid, $field  ) {
    	error_log( print_r($value,true) );
    	return $value;
    }
    add_filter('acf/update_value/type=flexible_content', 'check_flexible_fields', 10, 3);
    Array
    (
        [0] => Array
            (
                [acf_fc_layout] => my_custom_layout
                [field_56b8858daea60] => 8064
                [field_56b890cf7048c] => 'image1.jpg'
            )
    
        [1] => Array
            (
                [acf_fc_layout] => my_custom_layout
                [field_56b8858daea60] => 8301
                [field_56b890cf7048c] => 'image2.jpg'
            )
    
    )

    I’m missing something or there is a problem retrieving flexible content values when using the first filter?

    Thanks in advance

  • Hi @virgodesign

    Please open a new support ticket over at https://support.advancedcustomfields.com/new-ticket/ so that we can help in investigating this.

  • Hi James,
    I’ve submitted a support ticket.

    Thanks.

  • I’m having the same problem. Has this been resolved?

  • Same – any updates?

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

The topic ‘missing flexible fields in acf/update_value’ is closed to new replies.