Support

Account

Home Forums Gutenberg Custom fields not saving Reply To: Custom fields not saving

  • Guys, more updates:

    – I´ve installed wp 5.0.3 and acf 5.7.9 on a fresh install and i notice another issue using just Twenty Nineteen theme, where i added just a custom template (clone page.php) to check the Group Location when some page_template.

    I´m having this js error:

    Uncaught TypeError: Cannot read property ‘filter’ of undefined on wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3

    This is when editing a page using a group with just one text field inside. The error cames when switch Page Template, since this group has a Location to be visible only on post_type==page and page_template=my-template.php
    The same location also has another rule to be post_type=post && post_category=categoria-test

    As follows:

    if( function_exists('acf_add_local_field_group') ):
    
    acf_add_local_field_group(array(
    	'key' => 'group_5c38d943224d3',
    	'title' => 'Tests on aside posts',
    	'fields' => array(
    		array(
    			'key' => 'field_5c38d946c6704',
    			'label' => 'text',
    			'name' => 'text',
    			'type' => 'text',
    			'instructions' => '',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array(
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    			'default_value' => '',
    			'placeholder' => '',
    			'prepend' => '',
    			'append' => '',
    			'maxlength' => '',
    		),
    	),
    	'location' => array(
    		array(
    			array(
    				'param' => 'post_type',
    				'operator' => '==',
    				'value' => 'post',
    			),
    			array(
    				'param' => 'post_category',
    				'operator' => '==',
    				'value' => 'category:categoria-test',
    			),
    		),
    		array(
    			array(
    				'param' => 'post_type',
    				'operator' => '==',
    				'value' => 'page',
    			),
    			array(
    				'param' => 'page_template',
    				'operator' => '==',
    				'value' => '_template-test.php',
    			),
    		),
    	),
    	'menu_order' => 0,
    	'position' => 'normal',
    	'style' => 'default',
    	'label_placement' => 'top',
    	'instruction_placement' => 'label',
    	'hide_on_screen' => '',
    	'active' => 1,
    	'description' => '',
    ));
    
    endif;

    When editing a post_type = post, the error do not happend, only on pages and only when using gutemberg. If i use Classic Editor Plugin to disable gutember, the error do not hapend. But… a big “but”, on another wp site, same versions, the error also hapend when no gutemberg working.
    I´ve also tested same thing with a custom post type, and same thing, something when switch something that has a location rule assigned.

    Well… return to work 🙂