class 'RWMB__Field' not found
- This topic has 9 replies, 3 voices, and was last updated 8 years, 12 months ago by
grafik.
-
AuthorPosts
-
May 12, 2016 at 2:34 PM #3058
grafik
ParticipantHello,
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?
May 12, 2016 at 4:19 PM #3059grafik
ParticipantHere is a screenshot of the error if you require more information http://grfk.co.nz/1drms
May 12, 2016 at 5:57 PM #3061david82.rs
ParticipantHi 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.
May 12, 2016 at 11:32 PM #3063Anh Tran
KeymasterCould 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.
May 13, 2016 at 3:27 AM #3065grafik
ParticipantHi 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?
May 13, 2016 at 3:40 AM #3066grafik
ParticipantI also get the error if I load the metabox-group plugin via the wp-admin plugins. I'm on WP version 4.5.2
May 13, 2016 at 8:10 AM #3068Anh Tran
KeymasterLet me check again. The last time I checked it worked for me.
May 13, 2016 at 8:19 AM #3070grafik
ParticipantHow are you defining the metaboxes? I am using a separate file meta.php if that makes any difference.
May 13, 2016 at 10:41 AM #3073Anh Tran
KeymasterLast 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.
May 13, 2016 at 10:45 AM #3075grafik
ParticipantNice, that has fixed the error messages, will do some more testing to see if everything else is working as expected
-
AuthorPosts
- The topic ‘class 'RWMB__Field' not found’ is closed to new replies.