Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
On my local site, the field
switchshowOffvalue on the custom admin column as well, please see my screenshot https://cl.ly/825833f17303.Could you please deactivate then re-activate all plugins and recheck the problem?
April 29, 2020 at 9:34 AM in reply to: ✅"Image Advanced" field doesn't save full image details to REST API #19353Long Nguyen
ModeratorHi,
It's the feature of Group field
Database optimization of sub-fields for reduced bloat. If every field nested in Group has all property saved, it will increase the size of the database and slow down your site. That's why Group only saves necessary information of the sub-field.Hope that makes sense.
Long Nguyen
ModeratorHi,
Could you please let me know the data type of column which saves
switchvalue? I'm just using typeINTand it saves the value 0 and 1 as well, see my screenshot https://cl.ly/54c9e116ec61Here is the sample code https://pastebin.com/nvMFeqKD
Long Nguyen
ModeratorHi,
Could you please update the latest version of Meta Box to v5.2.10 and MB Group to v1.3.10 or MB AIO to v1.11.6 then check the problem again?
April 28, 2020 at 5:18 PM in reply to: ✅single image field with the id _thumbnail_id is not showing after latest updates #19337Long Nguyen
ModeratorHi,
After removing the default featured image and use the single image field with the ID
_thumbnail_idto save value for this meta key, it works as well with the latest version of Meta Box v5.2.10. Please try again with my sample code// Remove the featured image add_action( 'init', function () { remove_post_type_support( 'post', 'thumbnail' ); } ); add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { // Get the current post thumbnail and set as the default value for the single image field. $post_id = filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT ); $post_thumbnail = get_post_meta( $post_id, '_thumbnail_id' ); $meta_boxes[] = [ 'title' => 'Featured image', 'post_types' => 'post', 'fields' => [ // Register a single image field [ 'type' => 'single_image', 'id' => '_thumbnail_id', // This is the must! 'name' => 'Fake featured image', 'std' => $post_thumbnail, ], ], ]; return $meta_boxes; } );Let me know how it goes.
April 28, 2020 at 2:00 PM in reply to: ✅mb_user_profile_register Form does not show if already logged in #19329Long Nguyen
ModeratorHi,
A new update has been released, we've added a new option
show_if_user_canlets the form still shows the current user has a proper capability. This option is also updated in the documentation, please update the extension and check it out.Long Nguyen
ModeratorHi Jason,
Please update the new version of MB AIO to v1.11.6 or MB Frontend Submission to v2.2.1 then check the problem again. Also, if you want a field that is required, please use the
Validationmodule https://docs.metabox.io/validation/ to work with Ajax setting.Let me know how it goes.
April 28, 2020 at 10:23 AM in reply to: ✅Bug with most recent update: Error from WooCommerce Log #19326Long Nguyen
ModeratorHi,
You can go to Admin Dashboard -> Meta Box -> Taxonomies -> Edit a taxonomy -> Click the button
Get PHP Codeto get the code and paste it on the file functions.php or using Code Snippets plugin to create a taxonomy after deactivating MB AIO plugin, see my screenshot.But I also create a custom post type, taxonomies with MB AIO and admin columns for fields, taxonomies but the button Place Order on the Checkout page still works as well. Could you please switch to the default theme of WordPress (Twenty Nineteen) then check the problem again?
April 28, 2020 at 9:50 AM in reply to: ✅"Image Advanced" field doesn't save full image details to REST API #19324Long Nguyen
ModeratorHi,
If the field is nested in a group, it will be serialized and saved in the database such as
{"image_advanced":["1957","1956","1955"]}. For some special fields, only the ID will be saved and you need to use some helper functions to get the URL of the image by the ID. For more information, please follow this documentation
https://docs.metabox.io/extensions/meta-box-group/#special-fieldsLong Nguyen
ModeratorHi,
Please keep the eyes on updates. It's on its way.
Thank you, and have a beautiful day.
Long Nguyen
ModeratorHi guys,
Please update the new version of MB AIO to v1.11.6 or MB Group to v1.3.10 then check this problem again. Let me know how it goes.
Long Nguyen
ModeratorHi,
Currently, we are researching and developing feature supports to change the value of Admin columns in Quick Edit. If you really want to make the admin columns editable, please try to use the plugin Admin Columns and their addon Meta Box Integration.
Thank you.
April 27, 2020 at 10:32 AM in reply to: ✅How to create a unique identifier for each group when using clonable/sortable #19305Long Nguyen
ModeratorHi,
Because the field
groupsaves as a meta key in the database and serializes the value of all the fields nested in, so you should use the filterrwmb_settings_test_video_list_valueto modify the value of the fieldgroupand useforeachto loop through the array of the clone. The code would beadd_filter('rwmb_settings_test_video_list_value', 'settings_test_autoinc_value', 10, 3 ); function settings_test_autoinc_value($new, $field, $old) { // Loop through array of clone foreach ($new as $key => $value) { // check if the field video is empty if (empty($value['settings_test_video_id'])) { // set the ID for each field $new[$key]['settings_test_video_id'] = 4222; }else { $new[$key]['settings_test_video_id'] = 21223; } } return $new; }Long Nguyen
ModeratorHi Brian,
Could you please share your code which uses conditional logic? I will check it on my end.
Long Nguyen
ModeratorHi Amanda,
The field
image_advancedsupports the propertyfull_urlto get the full URL of the image, see my screenshot https://cl.ly/9ee6bc157bd4For more information, please follow the documentation
https://docs.metabox.io/fields/image-advanced/#template-usage -
AuthorPosts