Support Forum ยป User Profile

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Using metabox in few plugins at the same time #4296
    oleg.iondigioleg.iondigi
    Participant

    Hi, thanks for your investigation.
    I dived into the Timeline Express and find out the lines doing the error. Actually, the function new_cmb2_box([...]) calls an error.

    function new_cmb2_box( array $meta_box_config ) {
    	return cmb2_get_metabox( $meta_box_config );
    }
    
    function cmb2_get_metabox( $meta_box, $object_id = 0, $object_type = '' ) {
    
    	if ( $meta_box instanceof CMB2 ) {
    		return $meta_box;
    	}
    
    	if ( is_string( $meta_box ) ) {
    		$cmb = CMB2_Boxes::get( $meta_box );
    	} else {
    		// See if we already have an instance of this metabox
    		$cmb = CMB2_Boxes::get( $meta_box['id'] );
    		// If not, we'll initate a new metabox
    		$cmb = $cmb ? $cmb : new CMB2( $meta_box, $object_id );
    	}
    
    	if ( $cmb && $object_id ) {
    		$cmb->object_id( $object_id );
    	}
    
    	if ( $cmb && $object_type ) {
    		$cmb->object_type( $object_type );
    	}
    
    	return $cmb;
    }

    There are used https://wordpress.org/plugins/cmb2/ plugin, that seems it is not compatible with your plugin. Any idea to fix that.

    in reply to: Using metabox in few plugins at the same time #4246
    oleg.iondigioleg.iondigi
    Participant

    This didn't the trick.
    Same problem with Timeline Express plugin.
    Fatal error: Cannot declare class RWMB_Field, because the name is already in use in /wordpress/wp-content/plugins/brooks_core/inc/meta-box/inc/field.php on line 7
    I can't get it across how to check if your plugin is not used by another plugin initialed later.
    P.S I'm using TGMA class for required theme plugin, but users are going to add plugin they wish.

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