TypeError: selected.forEach is not a function
- This topic has 5 replies, 2 voices, and was last updated 7 years ago by
Ale.
-
AuthorPosts
-
November 5, 2018 at 4:26 PM #11831
Ale
ParticipantI'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:3Thanks
November 5, 2018 at 4:28 PM #11832Ale
ParticipantThis 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:30366November 6, 2018 at 9:18 AM #11844Ale
ParticipantThis is the metabox: https://ghostbin.com/paste/mc5bj
November 6, 2018 at 10:55 PM #11861Anh Tran
KeymasterHi 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?
November 6, 2018 at 11:10 PM #11864Ale
ParticipantThanks 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.3November 7, 2018 at 2:55 PM #11870Ale
ParticipantHello 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.
-
AuthorPosts
- You must be logged in to reply to this topic.