pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

DFV JS error on setting page with image field. #4516

Closed JoryHogeveen closed 7 years ago

JoryHogeveen commented 7 years ago

Package:

{"meta":{"version":"2.7.0-rc-1","build":1508170307},"pods":{"380":{"id":380,"name":"slider","label":"Slider","description":"","type":"settings","storage":"none","object":"","alias":"","fields":{"images":{"id":381,"name":"images","label":"Afbeeldingen","description":"","help":"","class":"","type":"file","weight":0,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"multi","file_uploader":"attachment","file_attachment_tab":"upload","file_edit_title":"1","file_limit":"10","file_restrict_filesize":"10MB","file_type":"images","file_add_button":"Afbeelding toevoegen","file_modal_title":"Attach a file","file_modal_add_button":"Add File","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","file_linked":"0","file_show_edit_link":"0","file_field_template":"rows","file_allowed_extensions":""}},"show_in_menu":1,"menu_name":"Slider","menu_location":"top","ui_style":"settings","menu_location_custom":"pods-settings-companyprofile","pll_ajax_backend":"1","enable_i18n":{"de_DE":"1","en_GB":"1","fr_FR":"1","nl_NL":"1","nl_NL_formal":"1","pl_PL":"1"}}}}

Error:

Uncaught TypeError: Cannot read property 'defaults' of undefined
    at n.invoke (pods-dfv.min.js?ver=2.7.0-rc-1:1)
    at n.onChildviewAddFileClick (pods-dfv.min.js?ver=2.7.0-rc-1:1)
    at n._childViewEventHandler (view.js:203)
    at _ (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,jquery-ui-widget,jquery-ui-position,wp-pointer,svg-painter,heartbeat,wp-auth-check,jquery-ui-core,j&load[]=query-ui-mouse,jquery-ui-sortable,thickbox,underscore,backbone,wp-util,wp-backbone,media-models,wp-plupload,mediaelement,wp-medi&load[]=aelement,media-views,suggest,wp-ajax-response,jquery-color,wp-lists,postbox,jquery-ui-menu,wp-a11y,jquery-ui-autocomplete,tags-s&load[]=uggest,tags-box,word-count,post&ver=4c78ed7a7a5495672893285b8210efb4:648)
    at m (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,jquery-ui-widget,jquery-ui-position,wp-pointer,svg-painter,heartbeat,wp-auth-check,jquery-ui-core,j&load[]=query-ui-mouse,jquery-ui-sortable,thickbox,underscore,backbone,wp-util,wp-backbone,media-models,wp-plupload,mediaelement,wp-medi&load[]=aelement,media-views,suggest,wp-ajax-response,jquery-color,wp-lists,postbox,jquery-ui-menu,wp-a11y,jquery-ui-autocomplete,tags-s&load[]=uggest,tags-box,word-count,post&ver=4c78ed7a7a5495672893285b8210efb4:648)
    at f (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,jquery-ui-widget,jquery-ui-position,wp-pointer,svg-painter,heartbeat,wp-auth-check,jquery-ui-core,j&load[]=query-ui-mouse,jquery-ui-sortable,thickbox,underscore,backbone,wp-util,wp-backbone,media-models,wp-plupload,mediaelement,wp-medi&load[]=aelement,media-views,suggest,wp-ajax-response,jquery-color,wp-lists,postbox,jquery-ui-menu,wp-a11y,jquery-ui-autocomplete,tags-s&load[]=uggest,tags-box,word-count,post&ver=4c78ed7a7a5495672893285b8210efb4:648)
    at n.u.trigger (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,jquery-ui-widget,jquery-ui-position,wp-pointer,svg-painter,heartbeat,wp-auth-check,jquery-ui-core,j&load[]=query-ui-mouse,jquery-ui-sortable,thickbox,underscore,backbone,wp-util,wp-backbone,media-models,wp-plupload,mediaelement,wp-medi&load[]=aelement,media-views,suggest,wp-ajax-response,jquery-color,wp-lists,postbox,jquery-ui-menu,wp-a11y,jquery-ui-autocomplete,tags-s&load[]=uggest,tags-box,word-count,post&ver=4c78ed7a7a5495672893285b8210efb4:648)
    at n.triggerMethod$1 (trigger-method.js:40)
    at n.triggerMethod (view.js:181)
    at n.<anonymous> (triggers.js:35)
pglewis commented 7 years ago

Probably a duplicate of #4418. I'm having difficulty reproducing it, will try the package provided.

Would be good to check a couple of different browsers to see if it may be somewhat browser-specific.

JoryHogeveen commented 7 years ago

Yep, looks like a duplicate, sorry. Maybe the package can help you replicate it.

quasel commented 7 years ago

guess we can close this to keep it "organized"