mennolui / wp-foyer

Foyer - a free Digital Signage plugin for WordPress. Perfect for theaters, music venues, cinemas and festivals.
GNU General Public License v3.0
49 stars 22 forks source link

Image upload not working #50

Open tostiheld opened 5 years ago

tostiheld commented 5 years ago

Unfortunately, uploading an image is currently not working. Clicks on the "Select image" button don't seem to do anything. Upon further investigation, the following notice is show in the console:

Uncaught TypeError: Cannot read property 'id' of undefined
    at Object.e (load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,jquery-ui-position,jquery-ui-menu&load[]=,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,post,svg-painter,wp-auth-check,shortcode,media-editor,media-audiovideo,&load[]=mce-view,imgareaselect,image-edit&ver=5.2.2:295)
    at b (load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,jquery-ui-position,jquery-ui-menu&load[]=,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,post,svg-painter,wp-auth-check,shortcode,media-editor,media-audiovideo,&load[]=mce-view,imgareaselect,image-edit&ver=5.2.2:295)
    at Object.e (load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,jquery-ui-position,jquery-ui-menu&load[]=,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,post,svg-painter,wp-auth-check,shortcode,media-editor,media-audiovideo,&load[]=mce-view,imgareaselect,image-edit&ver=5.2.2:295)
    at b (load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,jquery-ui-position,jquery-ui-menu&load[]=,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,post,svg-painter,wp-auth-check,shortcode,media-editor,media-audiovideo,&load[]=mce-view,imgareaselect,image-edit&ver=5.2.2:295)
    at load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,jquery-ui-position,jquery-ui-menu&load[]=,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,post,svg-painter,wp-auth-check,shortcode,media-editor,media-audiovideo,&load[]=mce-view,imgareaselect,image-edit&ver=5.2.2:295
    at load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,jquery-ui-position,jquery-ui-menu&load[]=,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,post,svg-painter,wp-auth-check,shortcode,media-editor,media-audiovideo,&load[]=mce-view,imgareaselect,image-edit&ver=5.2.2:295

It seems the property 'post' of wp.media.model.settings is undefined, and therefore the 'id' property of said post. I got this from https://github.com/mennolui/wp-foyer/blob/master/raw/js/admin/foyer-admin-slide.js#L124

My wordpress version is 5.2.2 My Foyer version is 1.7.4