Support

Account

Forum Replies Created

  • Currently i have the same problem in backend with another plugin (WP Customer Area).

    I’ve temporarely solved with this code

    function my_acf_admin_enqueue_scripts() {
    	wp_dequeue_script( 'select2');
    	wp_deregister_script( 'select2' );
    	wp_enqueue_style('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css');
        wp_enqueue_script('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js', '', '', false);
    }
    add_action('admin_enqueue_scripts', 'my_acf_admin_enqueue_scripts');

    But i don’t know if it’s the best approach and can bring problems to ACF backend pages and fields.

  • This reply has been marked as private.
  • Same here, after updating to 5.2.0 everytime that i change template on a page, the page attributes box disappear.
    I’ve to go to screen settings and check back the “Page attributes” checkbox.

  • Ok, seems that a call to wp ajax into the functions.php caused the problem.

    I had this code into functions.php used to process data for a form:

    // this hook is fired if the current viewer is not logged in
    	do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] );
    	// if logged in:
    	do_action( 'wp_ajax_' . $_POST['action'] );
    	add_action( 'wp_ajax_nopriv_gfl', 'gfl' );
    	add_action( 'wp_ajax_gfl', 'gfl' );
    	function gfl() {
    		if (isset($_POST['id'])){
    	        $id = $_POST['id'];
    	        $tr_type = get_tr_type($id);
    	        echo $tr_type;
    	    }else if(isset($_POST['to_id'])){
    	        $id = $_POST['to_id'];
    	        $tr_type = get_tr_type($id);
    	        echo $tr_type;
    	    }
    		exit;
    	}
    	add_action( 'wp_ajax_nopriv_gtl', 'gtl' );
    	add_action( 'wp_ajax_gtl', 'gtl' );
    	function gtl() {
    		$from_id = $_POST['id'];
    	    $to_id = $_POST['to_id'];
    	    get_to_locations($from_id,$to_id);
    		exit;
    	}

    Now i’ve wrapped this code between an is_admin() condition:
    if (!is_admin()) { // Ajax Code }

    Seems that the location is now working well.

  • Uhm, yep, i could try an “exclusion” verify.
    I would start deactivating plugins one by one and verify and then trying to remove custom functions on functions.php file.
    I’ll keep you updated here.

  • Hi Elliot,
    i got this message into the supposed locations list when changed “Show this field group if” select list:

    “Fatal error: Call to undefined function get_page_templates() in ../wp-content/plugins/advanced-custom-fields/core/controllers/field_group.php on line 633”

    On the Firebug console i don’t get any error or alert message, into the Firefox console i get this one:

    “[11:31:16.050] An empty string was sent to getElementById(). @ /wp-admin/post-new.php?post_type=acf”

    I’ve also tried the Chrome console, but over there no messages were displayed.

  • Another detail:
    create a new repeater field, till i don’t save the fields group, i can’t see the selects elements to choose the fields to be inside the created repeater.

  • Thanks Elliot, i’ll update you on this thread if i get news from WPML side.

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