Support Forum
Support › Meta Box Group › class 'RWMB__Field' not found
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?
Here is a screenshot of the error if you require more information http://grfk.co.nz/1drms
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.
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.
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?
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
Let me check again. The last time I checked it worked for me.
How are you defining the metaboxes? I am using a separate file meta.php if that makes any difference.
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.
Nice, that has fixed the error messages, will do some more testing to see if everything else is working as expected