This is a migrated thread and some comments may be shown as answers.

After upgrade Image/Document- managers insert button event

1 Answer 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 2
Marco asked on 25 Mar 2012, 04:23 PM
Dear Telerik,

After the upgrade form 2011.3.1115.40  to 2012.1.215.40 I had I lot of errors. Some thinks where fixed by the CAG and copieing dll's in the bin dir.

Any update gives me the creeps, it's giving me always troubles so it is not a thing I looking forward to.

This time I've spend over two days struggeling with the newest update, conlcuding that i had to roll back everything and stick with the 2011Q3 version.
For example im using the Documentmanger with Physical Paths which didnt work out.
So in the end ive build a new project complete according to the Telerik examples, and thank god... it didnt work in that project either...

Everything works fine until you want to insert that selected document into the RadEditor. I have search the code for a javascript Event on the insert button, I have set on every JS function a breakpoint none of them has been hit.

We did a rollback and it worked like a charme!

So there must be somthing wrong with it.

Regards Marco.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 28 Mar 2012, 03:05 PM
Hello,

We are aware of this issue introduced in the latest version of RadControls for ASP.NET AJAX. The problem is already fixed and the fix is available in the latest internal build.

Until the official release of the upcoming service pack, as a workaround you can modify the GetFiles() method of the content provider to provide the path to the file to the Location property of the FileItem, e.g.:

private FileItem[] GetFiles(string realDirectoryPath)
{
    List<FileItem> filesResult = new List<FileItem>();
    List<XmlNode> responseResult = ListBucket(realDirectoryPath);
    foreach (XmlNode content in responseResult)
    {
        string key = GetKeyNode(content).InnerText;
        if (!key.EndsWith("_$folder$"))
        {
            // This is a file, not a folder
            string size = GetSizeNode(content).InnerText;
            string url = (ItemHandlerPath + "?path=") + HttpUtility.UrlEncode(key);
            string fileName = VirtualPathUtility.GetFileName("/" + key);
  
            FileItem fileItem = new FileItem(fileName, VirtualPathUtility.GetExtension(key), int.Parse(size), HttpUtility.UrlEncode(key), url, string.Empty, GetPermissions(key));
  
            filesResult.Add(fileItem);
        }
    }
  
    return filesResult.ToArray();
}

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
General Discussions
Asked by
Marco
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or