Custom Fields
Re-Envisioned
Support Meta Box Builder WYSYWG editor delets content!

  • Creator
    Topic
  • #27731
    Resolved andreaskunzeduesseldorf@gmail.com
    Participant

    The custom field WYSYWG editor shows a very, very strange behavior: If it used with the plugin Display Posts (https://de.wordpress.org/plugins/display-posts-shortcode/) on a site it delets content when the site is saved. When I use WP Pods to have a WYSYWG editor field on the site the problem does not exist. Is this a bug or a feature of Meta Box? Thanks for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #27760
    Long Nguyen
    Moderator

    Hi Andreas,

    Thank you for reaching out.

    I've installed and activated the plugin Display Posts on my local site. After editing and save a post with a WYSIWYG field, I see the field saves data as well. Please follow the Debugging Information step and see if it works. If it still does not work, please share the code that creates the WYSIWYG field. Using the option "Get PHP Code" https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code, I will check it out.

    #27780

    Hi Long,

    first of all: Thank you for mentioning Immolist Mallorca in the showcase! And thanks for the quick reply.
    - The debugging information does not show any hint what is wrong
    - The php code is attached below.
    - In a short video you can see whats happens:
    https://drive.google.com/file/d/1BLts2zzSQkgMrjrI4ulwO8ovARwwW2MI/view
    It seems to be a very rare case. I occurs only when I put the shortcode in the standard content editor of a page. The same shortecode in the custom field works without any problem. It is not a big thing for me since I can build up the site without the shortcode in the standard content editor. Generally I am very happy with Metabox.

    Kind regards, Andreas

    <?php
    add_filter( 'rwmb_meta_boxes', 'il_pagefields' );

    function il_pagefields( $meta_boxes ) {
    $prefix = '';

    $meta_boxes[] = [
        'title'      =&gt; __( 'PageFields', 'il-mallorca' ),
        'id'         =&gt; 'pagefields',
        'post_types' =&gt; ['page'],
        'priority'   =&gt; 'low',
        'fields'     =&gt; [
            [
                'name' =&gt; __( 'Extratext', 'il-mallorca' ),
                'id'   =&gt; $prefix . 'extratext',
                'type' =&gt; 'wysiwyg',
            ],
            [
                'name'              =&gt; __( 'Schemadata', 'il-mallorca' ),
                'id'                =&gt; $prefix . 'schemadata',
                'type'              =&gt; 'textarea',
                'label_description' =&gt; __( 'Schema', 'il-mallorca' ),
                'save_field'        =&gt; 1,
            ],
        ],
    ];
    
    return $meta_boxes;
    

    }

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