Warning: Illegal string offset 'id'
- This topic has 3 replies, 2 voices, and was last updated 3 years, 2 months ago by
Long Nguyen.
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
February 9, 2022 at 9:25 PM #33803
Piero
ParticipantHi,
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>
February 10, 2022 at 1:05 PM #33816Long Nguyen
ModeratorHi Piero,
Please change the group ID to this one
'id' => $prefix . 'Cart',
or just cart
'id' => 'Cart',
and re-check the issue.
February 10, 2022 at 10:11 PM #33831Piero
ParticipantNothing, always shows the warning
February 12, 2022 at 2:28 PM #33861Long Nguyen
ModeratorHi,
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.
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.