SharePoint 2007 RadEditor WebPart v5.7.3.0 - Get WebPart from SPLimitedWebPartManager - ErrorWebPart

3 posts, 0 answers
  1. André
    André avatar
    2 posts
    Member since:
    Apr 2012

    Posted 19 Apr 2012 Link to this post


    We're having the following issue:

    - SharePoint 2007 SP3
    - RadEditor WebPart v5.7.3.0
    - RadEditorMOSS.wsp deployed to webapp
    - configured web.config as outlined here:

    When we try to get the RADEditor Webpart programatically via the SPLimitedWebPartManager, all WebParts show up as error WebParts (not only the RADEditor WebPart, but also all SPOOB WebParts). Once we retract the RadEditorMOSS.wsp Solution, we get the WebPart back correctly.
    Our issue is now, that we need the RADEditor WebPart to extract the RADEditor Content for processing. Any idea how we can get to this content?

  2. Rumen
    Rumen avatar
    13374 posts

    Posted 21 Apr 2012 Link to this post

    Hi André,

    My first suggestion is to try to reproduce the problem with the latest available version of RadEditor for MOSS 5.8.14.

    If the problem still persists try to extract the content directly from the database without using the SPLimitedWebPartManager class.

    If you still need help, open a support ticket and provide a sample working project, which demonstrates the problem so that we can test it on our end.

    All the best,
    the Telerik team
    Learn how the Telerik controls can be integrated in SharePoint 2007/2010 from this resource. To watch them in action, explore our online SharePoint 2010 and SharePoint 2007 demo sites.
  3. André
    André avatar
    2 posts
    Member since:
    Apr 2012

    Posted 21 Apr 2012 Link to this post

    We were able to get access via the webpart manager by upgrading to the latest RADEditor Version.

    Before upgrading, we tried to get access to the webpart directly via the DB. We used the following script: While we get some webpart properties and the HTML in the file exported in plain text, we also get some offset characters. Do you have guidance on how to work with the blob extract?

    The problem is solved for us. But some other folks might appreciate guidance on how to extract content directly from the DB..

    ## Export of "larger" Sql Server Blob to file           
    ## with GetBytes-Stream.        
    # Configuration data           
    $Server = "ReplaceWithSQLInstance";         # SQL Server Instance.           
    $Database = "ReplaceWithDatabaseName";           
    $Dest = "c:\temp\";             # Path to export to.           
    $bufferSize = 8192;               # Stream buffer size in bytes.
    $i = 1;
    $txt = ".txt"           
    # Select-Statement for name & blob           
    # with filter.           
    $Sql = "select Replace('httpx00//portal/' + b.DirName + b.LeafName + '-' + a.tp_ZoneID + '-' + CAST(a.tp_PartOrder as nvarchar(2)), '/', 'x00') as Url, tp_PerUserProperties from AllWebParts a join AllDocs b on a.tp_PageUrlID = where a.tp_WebPartTypeId like 'ReplaceWithWebPartID_GUID' and a.tp_IsIncluded = 1";   # The script returns the URL of the Page and Content of the WebPart - x00 as we can't write files with //    
    # Open ADO.NET Connection           
    $con = New-Object Data.SqlClient.SqlConnection;           
    $con.ConnectionString = "Data Source=$Server;Integrated Security=True;Initial Catalog=$Database";           
    # New Command and Reader           
    $cmd = New-Object Data.SqlClient.SqlCommand $Sql, $con;           
    $rd = $cmd.ExecuteReader();           
    # Create a byte array for the stream.           
    $out = [array]::CreateInstance('Byte', $bufferSize)           
    # Looping through records           
    While ($rd.Read())           
        Write-Output ("Exporting: {0}" -f $rd.GetString(0));                   
        # New BinaryWriter           
        $fs = New-Object System.IO.FileStream ($Dest + $rd.GetString(0) + $txt), Create, Write;           
        $bw = New-Object System.IO.BinaryWriter $fs;
        $start = 0;           
        # Read first byte stream           
        $received = $rd.GetBytes(1, $start, $out, 0, $bufferSize - 1);           
        While ($received -gt 0)           
           $bw.Write($out, 0, $received);           
           $start += $received;           
           # Read next byte stream           
           $received = $rd.GetBytes(1, $start, $out, 0, $bufferSize - 1);           
    # Closing & Disposing all objects           
    Write-Output ("Finished");

Back to Top