Support Forum
Hello, i have the last version of Metabox.io so i create a custom field call: galería de imágenes wich is a image advance type.
Hoy ever y can UPLOAD the first time the images and next i can't edit it or uload more images, please check follow attachment:
https://pasteboard.co/IleQOQ7.png
I got the follow issue in console:
Uncaught TypeError: this.$input.data(...).map is not a function
at N.d.initialize (media.js?ver=4.18.2:129)
at N.d.b.View (backbone.min.js?ver=1.2.3:1)
at N.d [as constructor] (backbone.min.js?ver=1.2.3:1)
at new N.d (backbone.min.js?ver=1.2.3:1)
at HTMLInputElement.initImageField (image-advanced.js?ver=4.18.2:32)
at Function.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.2.2:2)
at a.fn.init.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.2.2:2)
at HTMLDocument.<anonymous> (image-advanced.js?ver=4.18.2:43)
at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.2.2:2)
at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.2.2:2)
I check it:
https://github.com/wpmetabox/meta-box/commit/2c2e7da9e3cb340edcff2d80069e1fb27f1910a2
But doesn't work can you help me please?
My code is follow:
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
function your_prefix_register_meta_boxes( $meta_boxes ) {
$meta_boxes[] = array (
'title' => 'Carácteristicas',
'id' => 'caracteristicas',
'post_types' => array(
0 => 'fincas',
),
'context' => 'after_title',
'priority' => 'high',
'autosave' => true,
'fields' => array(
array (
'id' => 'codigo',
'type' => 'text',
'name' => 'Código',
'required' => 1,
),
array (
'id' => 'url',
'type' => 'url',
'name' => 'Video',
),
array (
'id' => 'capacidad',
'type' => 'number',
'name' => 'Capacidad de Personas Máxima',
'required' => 1,
),
array (
'id' => 'camas',
'type' => 'number',
'name' => 'Número de Camas',
'required' => 1,
),
array (
'id' => 'habitaciones',
'type' => 'number',
'name' => 'Número de Habitaciones',
),
array (
'id' => 'galerias',
'type' => 'image_advanced',
'name' => 'Galeria de imágenes',
'image_size' => 'thumbnail',
'max_status' => false,
),
),
);
return $meta_boxes;
}
This is a bug in the plugin and is already fixed here:
https://github.com/wpmetabox/meta-box/commit/2c2e7da9e3cb340edcff2d80069e1fb27f1910a2
Please apply it in the mean time. I'll update the Meta Box plugin in a few days.
Sorry I fixed it, was a conflict with other plugin: Real Media, I ubdated it and now work correctly. Thank you Anh
i'm up to date and i have the same error
react-dom.min.js?ver=16.13.1:125 TypeError: this.$input.data(...).map is not a function
at i.loadInitialAttachments (media.js?ver=5.3.6:148)
at initialize (media.js?ver=5.3.6:126)
at i.h.View (backbone.min.js?ver=1.4.0:2)
at i [as constructor] (backbone.min.js?ver=1.4.0:2)
at new i (backbone.min.js?ver=1.4.0:2)
at HTMLInputElement.initImageField (image-advanced.js?ver=5.3.6:37)
at Function.each (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.6:2)
at s.fn.init.each (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.6:2)
at HTMLDocument.init (image-advanced.js?ver=5.3.6:45)
at HTMLDocument.dispatch (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.6:2)
May be a regression ?
Hi,
This issue has been fixed for a long time ago. Please try to update the newest version of the Meta Box plugin 5.3.7 and WordPress 5.6 then deactivate all plugins except Meta Box and switch to the default theme of WordPress (Twenty TwentyOne) to check the issue again.
Let me know how it goes.