Custom Fields
Re-Envisioned
Support General WYSIWYG Editor Not Working Correctly

  • Creator
    Topic
  • #23716
    Resolved SLG Marketing
    Participant

    I've registered a WYSIWYG metabox on a page post type but the visual editor isn't working. If I swap to the "text" tab, I can type in there and the details are saved, but nothing is shown in the visual editor section.

    Screenshot showing issue

    Here is the code I'm using to register the metaboxes.

    
    $meta_boxes[] = array(
                'title' => 'Pedestal Details',
                'id'=>'pedestal_details',
                'post_types' => 'page',
                'fields' => array(
                    array(
                        'name'=>'Select Image Map',
                        'id'=>'image_map',
                        'type'=>'select',
                        'options'=>array(
                            'test'=> 'Test'
                        )
                    ),
                    array(
                        'name'=>'Hotspot Details',
                        'id'=>'hotspots',
                        'type'=>'group',
                        'clone'=>true,
                        'sort_clone'=>true,
                        'add_button'=>'Add a Hotspot',
                        'fields'=>array(
                            array(
                                'name'=>'Hotspot Title',
                                'id'=>'hotspot_title',
                                'type'=>'text'
                            ),
                            array(
                                'name'=>'Hotspot Content',
                                'id'=>'hotspot_content',
                                'type'=>'wysiwyg'
                            ),
                            array(
                                'name'=>'Hotspot Image',
                                'id'=>'hotspot_image',
                                'type'=>'image_advanced',
                                'multiple'=>false
                            ),
                            array(
                                'name'=>'Hotspot Products',
                                'id'=>'hotspot_products',
                                'type'=>'post',
                                'post_type'=>'product',
                                'clone' => true,
                                'add_button'=>'Add a product'
                            )
                        )
                    ),
                    array(
                        'name'=>'Select a download',
                        'id'=>'pedestal_downloads',
                        'type'=>'post',
                        'post_type'=>'download',
                        'clone' => true
                    )
                )
            );
    

    What have I missed?

Viewing 10 replies - 1 through 10 (of 46 total)
  • Author
    Replies
  • #23726
    Long Nguyen
    Moderator

    Hi,

    I'm going to check this issue and inform you later.

    Thank you.

    #23764
    Long Nguyen
    Moderator

    Hi,

    Please update the newest version of Meta Box 5.3.6 to fix this issue.

    #23787
    Gunvor
    Participant

    Hi, Long Nguyen!

    I have an issue with latest version Meta Box 5.3.6. Just updated today.

    So, I use this code
    add_filter( 'wp_default_editor', create_function( '', 'return "html";' ) );
    for html (plain text) editor by default.

    Everything was fine and Metabox was always listening this hook before today. Now any WYSIWYG fields from Meta Box show me Rich editor by default.

    What can I do?

    #23790
    stijlXpres
    Participant

    Hi,

    I am also experiencing issues with the latest version (5.3.6)
    Changes made in any metabox wysiwyg field are not saved when updating the page or post.

    What can I do?

    #23795
    Long Nguyen
    Moderator

    Hi friends,

    @Gunvor: since WordPress version 5.6 changes the TinyMCE display when using Block Editor so we have an update to re-render the TinyMCE (field WYSIWYG) to compatible with this change. The filter wp_default_editor might do not work after re-rendering. I'm going to create a feature request for the developer team to support this case.


    @stijlXpres
    : the field WYSIWYG value still saved after updating the post/page as well. Could you please deactivate all plugins except Meta Box, clear the cache, and check this issue again?

    #23800
    stijlXpres
    Participant

    Hi Long Nguyen,

    Unfortunately, your suggestion did not fix the issue. But I still can edit (and save) in 'text' mode, although the changes are not visible in 'visual' mode.

    Setting back MetaBox to version 5.3.5. does fix the issue on my sites.

    #23802
    Long Nguyen
    Moderator

    Hi,

    Please follow the Debugging Information, if it does not show anything, please do the step Private Website Info https://metabox.io/support/topic/how-to-create-a-new-topic/.

    #23805
    stijlXpres
    Participant

    Nothing shows up in debug mode unfortunatelly. Toggling between text-mode and visual-mode seems to trigger something. Which makes it unpredictable whether changes are being saved.

    I am testing on local server so sharing access is not an option. Although I experience the same issues on live server.

    #23839
    Gunvor
    Participant

    Iā€™m going to create a feature request for the developer team to support this case.

    Could you please tell me how long it will take to fix it? Or maybe there are some hack to fix it before your developer team do? Now I use old version of MetaBox.

    #23840
    SLG Marketing
    Participant

    Hi Long Nguyen

    Sorry for the delay in replying to you, we were on annual leave over the New Year period.

    I can confirm updating to 5.3.6 has fixed the issues we were having.

    Thanks for the quick turn around on this!

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