Found the culprit!
/components/com_kunena/template/crypsisb3/assets/js/ markitup.set.js
The version I had after 5.0.1 looks like this:
Code:
// For picture settings
$('#picture-modal-submit').click(function() {
var modalpictureurl = $('#modal-picture-url').val();
var modalpicturesize = $('#modal-picture-size').val();
var modalpicturealt = $('#modal-picture-alt').val();
var size = '';
if ( modalpicturesize.length > 0 ) {
size = 'size='+modalpicturesize;
}
var alt = '';
if ( modalpicturealt.length > 0 ) {
alt = 'alt='+modalpicturealt;
}
if ( modalpictureurl.length > 0 ) {
$.markItUp(
{ openWith:'[img '+size+' '+alt+']'+modalpictureurl,
closeWith:'[/img]' }
);
return false;
}
});
And the one on the working site looks like this:
Code:
// For picture settings
$('#picture-modal-submit').click(function() {
var modalpictureurl = $('#modal-picture-url').val();
var modalpicturesize = $('#modal-picture-size').val();
var size = '';
if ( modalpicturesize.length > 0 ) {
size = 'size='+modalpicturesize;
}
if ( modalpictureurl.length > 0 ) {
$.markItUp(
{ openWith:'[img '+size+']'+modalpictureurl,
closeWith:'[/img]' }
);
return false;
}
});
At submit, having an empty picture alt field (because the modal doesn't have an input field for it) throws an error, and fails.
After changing this part of the javascript, the modal works perfectly.
So case closed, but please check, how the incorrect code got into 5.0.1.
Thanks