Custom Fields
Re-Envisioned
Support General TypeError: selected.forEach is not a function

  • Creator
    Topic
  • #11831
    Ale
    Participant

    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #11832
    Ale
    Participant

    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
    
    #11844
    Ale
    Participant

    This is the metabox: https://ghostbin.com/paste/mc5bj

    #11861
    Anh Tran
    Keymaster

    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?

    #11864
    Ale
    Participant

    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

    #11870
    Ale
    Participant

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.