Custom Fields
Re-Envisioned
Support General Custom field wysiwyg break woocommerce product field

  • Creator
    Topic
  • #27565
    Resolved Heave
    Participant

    When 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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Author
    Replies
  • #27567
    Heave
    Participant

    Update it seems to happen when there is multiple wysiwyg custom field

    #27568
    Heave
    Participant

    And only within the same group.

    I can create multiple groupe of wysiwyg form the same post type and it works

    #27590
    Long Nguyen
    Moderator

    Hi,

    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.

    #27696
    Heave
    Participant

    any up ?

    #27716
    Long Nguyen
    Moderator

    Hi 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.

    #27724
    Heave
    Participant

    still 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

    #27748
    Long Nguyen
    Moderator

    Hi,

    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.

    #27755
    Heave
    Participant

    did 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;
    }
    #27773
    Long Nguyen
    Moderator

    Hi,

    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.

    #27774
    Heave
    Participant

    dang ! that was it, thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.