• 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' => '',
    				),
    			),
    		),
    
    • This topic was modified 5 years, 11 months ago by Yui.
    • This topic was modified 5 years, 11 months ago by Yui. Reason: code formatting

The topic ‘repeater fields don’t store values – sometimes…’ is closed to new replies.