Support Forum
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
Thanks
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
This is the metabox: https://ghostbin.com/paste/mc5bj
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.
Versions:
metabox 4.15.6
builder 2.9.4
group 1.2.16
columns 1.2.3
Hello Anh,
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.