class 'RWMB__Field' not found

Support MB Group class 'RWMB__Field' not found

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3058
    grafikgrafik
    Participant

    Hello,

    Currently, I load the metabox (v4.8.5) in my theme via functions.php like so:

    require get_template_directory() . '/lib/meta-box/meta-box.php'; 
    require get_template_directory() . '/lib/meta-box-group/meta-box-group.php'; 
    include 'meta.php';

    Next I add the following to my Meta definitions in meta.php

    $meta_boxes[] = array(
    	'id'		=> 'group_field',
    	'title'		=> 'Teasers',
    	'pages'		=> array( 'feature'),
    	'fields'	=> array(
    			array(
    				'id'     => 'standard',
    				// Gropu field
    				'type'   => 'group',
    				// Clone whole group?
    				'clone'  => true,
    				// Drag and drop clones to reorder them?
    				'sort_clone' => true,
    				// Sub-fields
    				'fields' => array(
    					array(
    						'name' => __( 'Track name', 'rwmb' ),
    						'id'   => 'text',
    						'type' => 'text',
    					),
    					array(
    						'name' => __( 'Release Date', 'rwmb' ),
    						'id'   => 'date',
    						'type' => 'date',
    					),
    					array(
    						'name'    => __( 'Genre', 'rwmb' ),
    						'id'      => 'genre',
    						'type'    => 'select_advanced',
    						'options' => array(
    							'pop'  => __( 'Pop', 'rwmb' ),
    							'rock' => __( 'Rock', 'rwmb' ),
    						),
    					),
    				),
    			),
    		),
    	);

    Yet I get the following error?

    "Warning: call_user_func() expects parameter 1 to be a valid callback, class 'RWMB__Field' not found in /www/koordinates/wp-content/themes/theme/lib/meta-box/inc/meta-box.php on line 221"

    I'm using all the latest builds as far as I know… any ideas?

    #3059
    grafikgrafik
    Participant

    Here is a screenshot of the error if you require more information http://grfk.co.nz/1drms

    #3061
    david82.rsdavid82.rs
    Participant

    Hi Grafik, i have the same problem.

    I can´t figure out how to insert extension directly in my theme files instead of install meta-box like plugin.

    #3063
    Anh TranAnh Tran
    Keymaster

    Could you please use the development version on Github? And use the latest version of Group extension?

    Let me know if you still see the bug.

    #3065
    grafikgrafik
    Participant

    Hi there, thanks for the quick reply.

    I'm using the latest version of metabox from github 4.8.5, and also the latest version of metabox-group (downloaded from My Account). Still getting the same error message.

    Any ideas?

    #3066
    grafikgrafik
    Participant

    I also get the error if I load the metabox-group plugin via the wp-admin plugins. I'm on WP version 4.5.2

    #3068
    Anh TranAnh Tran
    Keymaster

    Let me check again. The last time I checked it worked for me.

    #3070
    grafikgrafik
    Participant

    How are you defining the metaboxes? I am using a separate file meta.php if that makes any difference.

    #3073
    Anh TranAnh Tran
    Keymaster

    Last time I included both the extension's main file and the group class. I've just pushed a new version of the plugin with fix for this (and a big improvement for supporting multi-level nested groups).

    Please try it and let me know if you find any bug. Thanks.

    #3075
    grafikgrafik
    Participant

    Nice, that has fixed the error messages, will do some more testing to see if everything else is working as expected

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘class 'RWMB__Field' not found’ is closed to new replies.