Bug reports Found a bug? Post it here please.
Version 5.x > Bug reports > Media Library Mass Action Error View modes: 
User avatar
Member
Member
Peter - 2/21/2011 10:32:53 PM
   
Media Library Mass Action Error
While trying to mass import some FTP'd files to a media library I ran into an issue I've never encountered before.

When trying to perform a mass action (either on all or selected files) the asyc postback returns an error of:

"Syntax error: Missing operand after 'filename'' operator."

where "filename" is that name of any give file. I tracked the source of the message (not the error) to the MicrosoftAjaxWebForms.debug.js file in the function

function Sys$WebForms$PageRequestManager$_endPostBack(error, executor, data) {
if (this._request === executor.get_webRequest()) {
this._processingRequest = false;
this._additionalInput = null;
this._request = null;
}
var handler = this._get_eventHandlerList().getHandler("endRequest");
var errorHandled = false;
if (handler) {
var eventArgs = new Sys.WebForms.EndRequestEventArgs(error, data ? data.dataItems : {}, executor);
handler(this, eventArgs);
errorHandled = eventArgs.get_errorHandled();
}
if (error && !errorHandled) {
throw error;
}
}


I've confirmed this error under multiple browsers (IE, FF, Safari, Chrome) and on multiple servers. This is strange because this was working in the past. Manipulating the files individually still works but is cumbersome for large media needs.

I am running the latest hotfix for 5.5 R2.

Hope this can be corrected soon. Thanks!

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 3/2/2011 11:10:36 AM
   
RE:Media Library Mass Action Error
Hi,

This seems to be issue in current version of Kentico CMS. Could you please try to remove N character from following locations?

Line 2617 in ~\CMSModules\MediaLibrary\Controls\MediaLibrary\MediaLibrary.ascx.cs file:

DataSet fileData = GetFileSystemDataSource("FileName LIKE N'" + DataHelper.EscapeLikeQueryPatterns(fileName, true, true, true).Replace("'", "''") + "'");



Line 977 in ~\CMSModules\MediaLibrary\Controls\MediaLibrary\MediaLibrary.ascx.cs file:


where += "(FileName LIKE N'%" + searchText.Replace("'", "''") + "%')";


I hope this will help you. I’m very sorry for this inconvenience.

Best regards,
Miroslav Remias.