I was asked to look into a problem on a WordPress page that I didn't make. It uses Visual Composer and for a few days they can't add any images to the pages in the backend. The Single Image component loads, you can select the picture, but when you add it nothing happens.
Checking the console it gives the following error:
ReferenceError: id is not defined
in the following location: /wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-slider,jquery-tou&load%5B%5D=ch-punch,iris,wp-color-picker,jquery-ui-sortable,underscore,wp-a11y,thickbox,shortcode,plupload,jquery-ui-position,jquery-ui-men&load%5B%5D=u,jquery-ui-autocomplete,jquery-ui-tabs,farbtastic,media-upload&ver=4.5.2 line 98 > Function
var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
with(obj||{}){
__p+='\n <li class="added">\n <div class="inner" style="width: 75px; height: 75px; overflow: hidden;text-align: center;">\n <img rel="'+
((__t=( id ))==null?'':__t)+
'" src="'+
((__t=( url ))==null?'':__t)+
'" />\n </div>\n <a href="#" class="icon-remove"></a>\n </li>\n';
}
return __p;
Tried to fix it by this, this, this and this solution, but nothing worked.