I'm getting this error on the console once I duplicate [+ Add More] a group that contains select_advanced field.
Once this happens I can't sort or actually use select_advance.
This is the error message:
TypeError: selected.forEach is not a function[Learn More] select-advanced.js:13:3
This is the rest of the message:
reorderSelected http://colorale.local/wp-content/themes/colorale/lib/metaboxes/js/select-advanced.js:13:3 update http://colorale.local/wp-content/themes/colorale/lib/metaboxes/js/select-advanced.js:40:3 each http://colorale.local/wp-admin/load-scripts.php:2:2879 each http://colorale.local/wp-admin/load-scripts.php:2:844 <anonymous> http://colorale.local/wp-content/themes/colorale/lib/metaboxes/js/select-advanced.js:53:31 i http://colorale.local/wp-admin/load-scripts.php:2:27444 fireWith http://colorale.local/wp-admin/load-scripts.php:2:28213 ready http://colorale.local/wp-admin/load-scripts.php:2:30004 K http://colorale.local/wp-admin/load-scripts.php:2:30366
Hi Ale, I've just tested with your code and couldn't see the bug. Which versions of the extensions are you using? Can you please update to the latest ones?
Thanks for your reply Anh.
This are the extensions I use:
// Initialize Metaboxes require get_template_directory() . '/lib/metaboxes/meta-box.php'; // Extensions require get_template_directory() . '/lib/extensions/meta-box-builder/meta-box-builder.php'; require get_template_directory() . '/lib/extensions/meta-box-group/meta-box-group.php'; require get_template_directory() . '/lib/extensions/meta-box-columns/meta-box-columns.php'; // Create metaboxes require_once('metabox-works.php');
I've updated all earlier today with same result.
Interestingly, I've found that if set clone_default for the container groups to false, the TypeError error disappears.
Could clone_default be what triggers this error?
BTW, I've tried the previous code in a new WordPress installation with a TwentySeventeen and I still had the same TypeError problem.