Warning: Illegal string offset 'id'

Support MB Group Warning: Illegal string offset 'id'

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33803
    PieroPiero
    Participant

    Hi,
    we have update my meta box group to last version and now show this:

    Warning: Illegal string offset 'id' in wp-content/plugins/meta-box-group/group-field.php on line 91

    whenever I have the group boxes

    how can i solve?

    Tnk

    Example code:

    <div>
    'fields' => array(
            // Group
            array(
                    'id' => "{$prefix}Cart",
                    // Group field
                    'type'   => 'group',
                    // Clone whole group?
                    'clone'  => true,
                    'sort_clone'=>true,
                    'max_clone' => 4,
                    'fields' => array(
                    array(
                                'name'        => "Articolo",
                                'id'          => "art_id", 
                                'type'        => 'post',                             
                                // Post type: string (for single post type) or array (for multiple post types)
                                'post_type'   => array('post','glossario','focus'),
                                // Default selected value (post ID)
                                'std'         => 1,
                                // Field type, either 'select' or 'select_advanced' (default)
                                'field_type'  => 'select_advanced',
                                'desc' => 'Può essere: articolo, focus e glossario.' ,
                                // Placeholder
                                'placeholder' => __( 'Seleziona articolo', 'your-prefix' ),
                                'js_options'      => array(
                                                                'width' => '95%',
                                                            ),
                                // Query arguments (optional). No settings means get all published posts
                                // @see https://codex.wordpress.org/Class_Reference/WP_Query
                                'query_args'  => array(
                                    'post_status'    => 'publish',
                                    'posts_per_page' => - 1,
                                ),
                            ), ) )</div>
    
    #33816
    Long NguyenLong Nguyen
    Moderator

    Hi Piero,

    Please change the group ID to this one

    'id' => $prefix . 'Cart',

    or just cart

    'id' => 'Cart',

    and re-check the issue.

    #33831
    PieroPiero
    Participant

    Nothing, always shows the warning

    #33861
    Long NguyenLong Nguyen
    Moderator

    Hi,

    I do not see any issue when running your code on my demo site. Please try to deactivate all plugins except Meta Box, MB extensions and switch to the standard theme of WordPress (Twenty) then re-check the issue.

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