Support

Account

Home Forums Add-ons Repeater Field Some repeater field don't save values – sometimes

Solving

Some repeater field don't save values – sometimes

  • (this is my 2nd try to post this to the forum – the server here seems to have some hiccups).

    I developed a solution with a repeater and five fields within the repeater on my local development platform (MAMP) in WP 5.3.2 and with ACF Pro 5.8.11. Everything works fine here.

    After deploying the solution to my test-server running WP 5.4.1 and again with ACF Pro 5.8.11 I have a strange problem with two of the five fields in the repeater. They don’t store any values. Not if I use the front end and not with the update_value hook in PHP.
    I checked the PHP settings of the server – everything should be fine (max vars 3.000…) and there are no error messages in the log files.

    It is simply impossible to store any values in those two fields. I changed the order of the fields, deleted one of them – nothing helps and all other fields work fine.

    this is the part of the definition for the field group – activity_username and activity_id are the two fields with the problems:

    array(
    ‘key’ => ‘field_5e80b9580b0a0’,
    ‘label’ => ‘Kommentare’,
    ‘name’ => ‘activity’,
    ‘type’ => ‘repeater’,
    ‘instructions’ => ”,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ”,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘show_in_rest’ => 1,
    ‘edit_in_rest’ => 1,
    ‘collapsed’ => ”,
    ‘min’ => 0,
    ‘max’ => 0,
    ‘layout’ => ‘row’,
    ‘button_label’ => ”,
    ‘sub_fields’ => array(
    array(
    ‘key’ => ‘field_5eabdbfa55962’,
    ‘label’ => ‘activity_id’,
    ‘name’ => ‘activity_id’,
    ‘type’ => ‘text’,
    ‘instructions’ => ”,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ’10’,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘show_in_rest’ => 1,
    ‘edit_in_rest’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ”,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘maxlength’ => ”,
    ‘readonly’ => 1,
    ‘disabled’ => 0,
    ),
    array(
    ‘key’ => ‘field_5e80b9950b0a1’,
    ‘label’ => ‘Erstellungsdatum’,
    ‘name’ => ‘activity_date’,
    ‘type’ => ‘text’,
    ‘instructions’ => ”,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ’20’,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘show_in_rest’ => 1,
    ‘edit_in_rest’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ”,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘maxlength’ => ”,
    ‘readonly’ => 1,
    ‘disabled’ => 0,
    ),
    array(
    ‘key’ => ‘field_5e80b9bd0b0a2’,
    ‘label’ => ‘Nutzer_ID’,
    ‘name’ => ‘activity_user’,
    ‘type’ => ‘text’,
    ‘instructions’ => ”,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ’10’,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘show_in_rest’ => 1,
    ‘edit_in_rest’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ”,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘maxlength’ => ”,
    ‘readonly’ => 1,
    ‘disabled’ => 0,
    ),
    array(
    ‘key’ => ‘field_5eabdfeca5919’,
    ‘label’ => ‘Autor’,
    ‘name’ => ‘activity_username’,
    ‘type’ => ‘text’,
    ‘instructions’ => ”,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ’20’,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘show_in_rest’ => 1,
    ‘edit_in_rest’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ”,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘maxlength’ => ”,
    ‘readonly’ => 1,
    ‘disabled’ => 0,
    ),
    array(
    ‘key’ => ‘field_5e80b9e00b0a3’,
    ‘label’ => ‘Kommentar’,
    ‘name’ => ‘activity_comment’,
    ‘type’ => ‘textarea’,
    ‘instructions’ => ”,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ’40’,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘show_in_rest’ => 1,
    ‘edit_in_rest’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ”,
    ‘maxlength’ => ”,
    ‘rows’ => ”,
    ‘new_lines’ => ”,
    ),
    ),
    ),

  • It’s really hard to tell without being able to look at the whole picture. That’s probably why nobody has answered so far. Perhaps it’s something with the field names that is conflicting with something else on that server? Would renaming the fields do the trick?

  • i have the same problem, in my testing site (both pages are in the same server but differents instance) and the unique difference is in my testing site use the UI for build the form, then i export and add to the page where i want and the other important data is in the options page, i check the database in options table and yes, the fields are created and the value data is empty

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

The topic ‘Some repeater field don't save values – sometimes’ is closed to new replies.