FileExplorer stops working after 2012 Q1 update

6 posts, 0 answers
  1. Adam
    Adam avatar
    177 posts
    Member since:
    Oct 2012

    Posted 17 Feb 2012 Link to this post

    For some reason, a lot of things appear to be broken using the custom file provider option after upgrading to Q1. I'm using the Custom File Provider that was created by Telerik as an example of how to reference network shares. I'm not sure if it changed with the most recent update, but I know it doesn't work anymore with Q1.

    When I attempt to copy a file, I get a permissions error. When I attempt to rename a file, I get a permissions error. I looked at the code a bit and noticed some odd changes. In the GetPath function, it used to pass in the virtual path, but with the update, it's been passing in an empty string. This appears to be the cause of the permissions errors since the path isn't valid.

    Is something broken, or was a breaking change released that I'm going to have work around. I didn't see anything in the release notes.

    Thanks,
    Adam
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 22 Feb 2012 Link to this post

    Hi Adam,

    We are aware of an bug introduced in the latest version of RadFileExplorer that is related to the custom content providers compatibility. We are working on its fix and will try to do our best to have it handled until the service pack.

    To workaround this issue, you need to provide the path to the file (including the filename) to the Location property of the FileItem in the GetFiles() method of the content provider, e.g.:
    private FileItem[] GetFiles(string virtualPath)
    {
        List<FileItem> filesItems = new List<FileItem>();
        string physicalPath = this.GetPhysicalFromVirtualPath(virtualPath);
        if (physicalPath == null)
            return null;
        List<string> files = new List<string>();// The files in this folder : 'physicalPath' ;
     
        try
        {
            foreach (string patern in this.SearchPatterns)
            {// Applied flters in the 'SearchPatterns' property;
                foreach (string filePath in Directory.GetFiles(physicalPath, patern))
                {
                    if (!files.Contains(filePath))
                        files.Add(filePath);
                }
            }
     
            foreach (string filePath in files)
            {
                FileInfo fileInfo = new FileInfo(filePath);
                string url = ItemHandlerPath + "?path=" + virtualPath + fileInfo.Name;
                FileItem fileItem = new FileItem(fileInfo.Name,
                                                    fileInfo.Extension,
                                                    fileInfo.Length,
                                                    virtualPath + fileInfo.Name,
                                                    url,
                                                    null,
                                                    GetPermissions(filePath)
                                                );
                filesItems.Add(fileItem);
            }
        }
        catch (IOException)
        {// The parent directory is moved or deleted
     
        }
     
        return filesItems.ToArray();
    }


    Kind regards,
    Dobromir
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. JH
    JH avatar
    12 posts
    Member since:
    Jul 2008

    Posted 29 Feb 2012 Link to this post

    In addition to the problem above (for which the work-around seems to work perfectly fine), we also have the problem that our files are now recognized and rendered as folders. Is this also a known issue?
  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 29 Feb 2012 Link to this post

    Hi Jérémy,

    We are not aware of such issue of RadFileExplorer, however, the side effects of the bug may differ according to the content provider. Could you please provide the content provider that you are using so we can examine and investigate the issue further?

    Regards,
    Dobromir
    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.
  6. David Tessler
    David Tessler avatar
    23 posts
    Member since:
    Feb 2005

    Posted 05 Mar 2012 Link to this post

    We too are having the same trouble with this release + our customer provier. All of our clientside handlers are failing due to the fact the contextual menu cannot access or return the proper current selected item.

    The work around was to create a global js var, but thtere are still far too many issues to make it workable. The DELETE button tries to delete the ROOT -- but can't. again, it can;t find the current selected item.

    We are also seeing permissions errors if we try to rename or delete any type of item.
  7. David Tessler
    David Tessler avatar
    23 posts
    Member since:
    Feb 2005

    Posted 05 Mar 2012 Link to this post

    Hi Dobromir,
    I can send our custom file provider, but I am not in a position to share it publicly. I will create a new support ticket with it attached.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017