+1
It also happens when you have a movie in the trash folder.
I had a movie called “instinct” in the trash folder and I didn’t know, so when I tried to import “instinct” (using Tab nº 3) I got the same JS error: “Cannot read property ‘length’ of undefined…”
Sorry, I Made a mistake, I pasted the same patched code twice.
The original function is:
function alter_ul_post_values(obj,post_id,ul_type)
{
jQuery(obj).find("span").html("..");
jQuery.ajax({
type: "POST",
url: "<?php echo plugins_url( 'ajax_counter.php' , __FILE__ );?>",
data: "post_id="+post_id+"&up_type="+ul_type,
success: function(msg){
jQuery(obj).find("span").html(msg);
}
});
}