Custom field wysiwyg break woocommerce product field
- This topic has 10 replies, 2 voices, and was last updated 3 years, 11 months ago by
Heave.
-
AuthorPosts
-
April 23, 2021 at 3:34 PM #27565
Heave
ParticipantWhen having on a woocommerce product new custom field added by metabow and using the wysiwyg format it desactivate description & shortdescription tabs (but also the wysiwyg'ones) and block them on code mode instead of visual.
April 23, 2021 at 4:07 PM #27567Heave
ParticipantUpdate it seems to happen when there is multiple wysiwyg custom field
April 23, 2021 at 4:12 PM #27568Heave
ParticipantAnd only within the same group.
I can create multiple groupe of wysiwyg form the same post type and it works
April 24, 2021 at 10:43 AM #27590Long Nguyen
ModeratorHi,
Thank you for your feedback.
I've escalated this issue to the development team. They will ship an update to fix it as soon as possible.
April 27, 2021 at 5:26 PM #27696Heave
Participantany up ?
April 28, 2021 at 6:20 AM #27716Long Nguyen
ModeratorHi Heave,
Please update the new version of Meta Box 5.3.10, clear cache, and re-check the issue. If it does not work, please share the code that creates your custom fields, I will help you to check.
April 28, 2021 at 2:25 PM #27724Heave
Participantstill have the following error :
wp-tinymce.js?ver=49110-20201110:3 Uncaught TypeError: Cannot read property 'onpageload' of undefined
at wp-tinymce.js?ver=49110-20201110:3
at e (wp-tinymce.js?ver=49110-20201110:3)
at Se.y.bind (wp-tinymce.js?ver=49110-20201110:3)
at Object.M [as bind] (wp-tinymce.js?ver=49110-20201110:3)
at Object.init (wp-tinymce.js?ver=49110-20201110:3)
at n (editor.min.js?ver=5.7.1:2)
at HTMLDocument.<anonymous> (editor.min.js?ver=5.7.1:2)
at C (wp-tinymce.js?ver=49110-20201110:3)
at HTMLDocument.d (wp-tinymce.js?ver=49110-20201110:3)also custom field is directly creater through metabox, no code
April 29, 2021 at 9:54 AM #27748Long Nguyen
ModeratorHi,
Please try to deactivate all plugins except Meta Box, MB extensions, WooCommerce and switch to another theme (Twenty TwentyOne) to re-check the issue.
You can also share the code that creates the custom fields by using "Get PHP Code" option, get more details here https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code.
April 29, 2021 at 2:41 PM #27755Heave
Participantdid swtich every plugin off but woocommerce + mb addon = same result can't switch tab, stick on text and error in console
here is the code
<?php add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $prefix = 'meta_'; $meta_boxes[] = [ 'title' => __( 'Custom Field Produit', 'your-text-domain' ), 'id' => 'custom-field-produit', 'post_types' => ['product'], 'priority' => 'low', 'fields' => [ [ 'name' => __( 'Texture et goût', 'your-text-domain' ), 'id' => $prefix . 'texture_gout', 'type' => 'textarea', 'required' => 1, 'save_field' => 1, ], [ 'name' => __( 'Contre indications', 'your-text-domain' ), 'id' => $prefix . 'contre_indications', 'type' => 'textarea', 'save_field' => 1, ], [ 'name' => __( 'Mode d’emploi', 'your-text-domain' ), 'id' => $prefix . 'mode_d\'emploi', 'type' => 'wysiwyg', 'save_field' => 1, ], [ 'name' => __( 'Spheres', 'your-text-domain' ), 'id' => $prefix . 'spheres', 'type' => 'wysiwyg', 'save_field' => 1, ], ], ]; return $meta_boxes; }
April 30, 2021 at 11:06 AM #27773Long Nguyen
ModeratorHi,
Thank you for your additional information.
There is a problem when the field ID has a special character (single quote). To resolve this case, please edit your field ID and change it to
mode_demploi
. Screenshot https://share.getcloudapp.com/nOuoQ669.Let me know how it goes.
April 30, 2021 at 2:28 PM #27774Heave
Participantdang ! that was it, thanks
-
AuthorPosts
- You must be logged in to reply to this topic.