Meta Box Repeater (Group, Clone) Issue: “Undefined array key clone” Warning
-
Hello everyone,
I’m having trouble with a Meta Box repeater field (
type: 'group',clone: true) defined in my theme’sfunctions.php. I’m using the free version of Meta Box.The issue (in WordPress admin, for ‘post’ post type):
- Labels for nested fields (e.g., “Title”, “Text”) are missing.
- Only one sub-field is displayed per item, instead of the two defined.
- Only the first added repeatable item saves; others disappear after updating.
I’m seeing this PHP warning in my
debug.log:PHP Warning: Undefined array key "clone" in /path/to/my/wordpress/wp-content/plugins/meta-box/inc/meta-box.php on line 242Troubleshooting already performed:
- Confirmed
'type' => 'group'is uncommented. - Reinstalled Meta Box plugin (manual FTP upload of latest version).
- Deactivated all other plugins.
- Switched to default WordPress theme (Twenty Twenty-Four).
max_input_varsis 3000-5000 (verified viaphpinfo()).- No JavaScript errors in browser console.
My WordPress is up to date, and PHP version is 8.1.
Here’s an example of the field definition I’m trying to use (similar to basic examples from Meta Box docs): https://docs.metabox.io/extensions/meta-box-group/
Any help is appreciated. Thank you!
The topic ‘Meta Box Repeater (Group, Clone) Issue: “Undefined array key clone” Warning’ is closed to new replies.