Problems with the latest version of metabox vs mmb-settings-page
Support › MB Settings Page › Problems with the latest version of metabox vs mmb-settings-page
- This topic has 18 replies, 2 voices, and was last updated 8 years, 7 months ago by
Infolu Official.
-
AuthorPosts
-
August 16, 2016 at 2:09 AM #3850
Infolu Official
ParticipantAfter solving the problem of maps, the update came into conflict with the mb-settings-page where the tabs are not loaded
August 16, 2016 at 9:58 AM #3855Anh Tran
KeymasterThanks for reporting. Let me check with @funkedgeek on Github.
August 17, 2016 at 9:52 AM #3868Infolu Official
Participanthello any news on this? to not run out settings pages'm using the old version which had problems with maps.
August 18, 2016 at 8:49 AM #3878Anh Tran
KeymasterI'm still checking :(. I will try to fix it asap.
August 18, 2016 at 9:24 AM #3879Anh Tran
KeymasterAh, I've just found the bug.
Please set the
tab
attribute for meta box, not for fields. So:- Settings page define tabs
- Meta box define tab (where it belongs to)Please check out the documentation for the correct code.
Note: this is different from the Meta Box tabs extension, where:
- Meta Box defines tabs
- Fields define tab (where it belongs to)In combination of both Settings Page & Meta Box tabs, ideally you can create tabs for page and sub-tabs for fields 😉 (Just the idea, I haven't tested it yet).
August 18, 2016 at 3:45 PM #3887Infolu Official
ParticipantHello Anh Tran, I'm using the example where the tab is defined in metabox but it does not work.
/ Register settings page. In this case, it's a theme options page add_filter( 'mb_settings_pages', 'prefix_options_page' ); function prefix_options_page( $settings_pages ) { $settings_pages[] = array( 'id' => 'pencil', 'option_name' => 'pencil', 'menu_title' => __( 'Pencil', 'textdomain' ), 'icon_url' => 'dashicons-edit', 'style' => 'no-boxes', 'columns' => 1, 'tabs' => array( 'general' => __( 'General Settings', 'textdomain' ), 'design' => __( 'Design Customization', 'textdomain' ), 'faq' => __( 'FAQ & Help', 'textdomain' ), ), 'position' => 68, ); return $settings_pages; } // Register meta boxes and fields for settings page add_filter( 'rwmb_meta_boxes', 'prefix_options_meta_boxes' ); function prefix_options_meta_boxes( $meta_boxes ) { $meta_boxes[] = array( 'id' => 'general', 'title' => __( 'General', 'textdomain' ), 'settings_pages' => 'pencil', 'tab' => 'general', 'fields' => array( array( 'name' => __( 'Logo', 'textdomain' ), 'id' => 'logo', 'type' => 'file_input', ), array( 'name' => __( 'Layout', 'textdomain' ), 'id' => 'layout', 'type' => 'image_select', 'options' => array( 'sidebar-left' => 'http://i.imgur.com/Y2sxQ2R.png', 'sidebar-right' => 'http://i.imgur.com/h7ONxhz.png', 'no-sidebar' => 'http://i.imgur.com/m7oQKvk.png', ), ), ), ); $meta_boxes[] = array( 'id' => 'colors', 'title' => __( 'Colors', 'textdomain' ), 'settings_pages' => 'pencil', 'tab' => 'design', 'fields' => array( array( 'name' => __( 'Heading Color', 'textdomain' ), 'id' => 'heading-color', 'type' => 'color', ), array( 'name' => __( 'Text Color', 'textdomain' ), 'id' => 'text-color', 'type' => 'color', ), ), ); $meta_boxes[] = array( 'id' => 'info', 'title' => __( 'Theme Info', 'textdomain' ), 'settings_pages' => 'pencil', 'tab' => 'faq', 'fields' => array( array( 'type' => 'custom_html', 'std' => __( '<strong>Having questions?</strong><br><br><a href="https://metabox.io/docs/" target="_blank" class="button-primary">Go to our documentation</a>', 'textdomain' ), ), ), ); return $meta_boxes; }
August 22, 2016 at 8:08 PM #3905Infolu Official
ParticipantStaff without news? I'm still or use but or use the page settings, I can not use both 🙁
August 23, 2016 at 4:30 PM #3910Anh Tran
KeymasterThat's quite strange to me. I'm using the latest version on Github and tested with the code above. Everything seems to be fine :(.
Can you try the latest version of both plugins?
August 23, 2016 at 4:47 PM #3911Infolu Official
ParticipantHello
when I say that I am using the latest version is that the Fix bug funkedgeek with rwmb_meta function ... with a fix for the problem https://github.com/rilwis/meta-box/issues/943 ie the latest version
https://github.com/rilwis/meta-box/archive/master.ziphttps://github.com/rilwis/meta-box/releases the release version has the fix for map.
August 23, 2016 at 5:44 PM #3912Anh Tran
KeymasterYes, the latest version on Github has the fix for map and that's the version I'm using. Or am I misunderstanding something?
August 23, 2016 at 6:16 PM #3914Infolu Official
ParticipantNot the release version does not have the latest updates
Version Release maps does not work for me, however works settings pages
Version master works maps but it does not work settings pages.
A note is the problem of maps for online and not on localhost
See Moment funkedgeek resolvel the problem of maps and acrecentou the Wierd correction ||
check Caused 'rwmb_meta' to default to backup function
instead of built into fields functions (which solved many other problems)
https://github.com/rilwis/meta-box/issues/943If you look the release inc / inc / functions.php
You will notice that neither was the bustituido | | per &&ie the release version is not the version with online maps to fix the funkedgeek resolvel.
the master version on the other hand is the version with the latest fixes more than this unfortunately with problems with the pages configuration addon.
My addon configuration pages is the Version: 1.1.2
August 23, 2016 at 10:04 PM #3916Infolu Official
ParticipantIn my tests I edited the inc/core.php file
/** * Register hooks. */ public function __construct() { $plugin = 'meta-box/meta-box.php'; add_filter( "plugin_action_links_$plugin", array( $this, 'plugin_links' ) ); add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) ); //EDIT init per admin_init add_action( 'init', array( $this, 'register_meta_boxes' ) ); add_action( 'init', array( $this, 'register_wpml_hooks' ) ); add_action( 'edit_page_form', array( $this, 'fix_page_template' ) ); }
PER
/** * Register hooks. */ public function __construct() { $plugin = 'meta-box/meta-box.php'; add_filter( "plugin_action_links_$plugin", array( $this, 'plugin_links' ) ); add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) ); //EDIT init per admin_init add_action( 'admin_init', array( $this, 'register_meta_boxes' ) ); add_action( 'admin_init', array( $this, 'register_wpml_hooks' ) ); add_action( 'edit_page_form', array( $this, 'fix_page_template' ) ); }
and edited the file inc / metabox.php
In the master version file has been removed to the lower part
/** * Get field class name. Only for backward compatibility. * @param array $field Field array * @return string Field class name */ public static function get_class_name( $field ) { return RWMB_Field::get_class_name( $field ); }
For me it worked the above modifications
August 25, 2016 at 4:54 PM #3931Anh Tran
KeymasterI was making the changes on the extension locally and forgot to update it. That's why it was working for me :(. I've just released a new version of the extension. Can you try it again?
August 25, 2016 at 6:00 PM #3937Infolu Official
ParticipantHi Anh Tran,unfortunately for me not work, I'm Environment
Below
metabox-master (Release does not have the correction of maps)
metabox 1.1.3 pages settings
wordpress 4.6
It only works with the changes I mentioned above in core.php files and meta-box.php
August 26, 2016 at 11:22 AM #3940Anh Tran
KeymasterI've recorded a video. It works on my case :(. Please take a look:
PS: To download the latest version on Github, please use this link:
-
AuthorPosts
- The topic ‘Problems with the latest version of metabox vs mmb-settings-page’ is closed to new replies.