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

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

2 Answers 65 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
André
Top achievements
Rank 1
André asked on 19 Apr 2012, 04:11 PM
Hello,

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: http://www.telerik.com/help/aspnet-ajax/moss-install-aspnet-ajax-35.html

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?

Thanks,
André

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 21 Apr 2012, 01:45 PM
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,
Rumen
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.
0
André
Top achievements
Rank 1
answered on 21 Apr 2012, 02:29 PM
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: http://social.technet.microsoft.com/wiki/contents/articles/890.export-sql-server-blob-data-with-powershell-en-us.aspx. 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 = b.id 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";           
$con.Open();           
           
# 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);           
       $bw.Flush();           
       $start += $received;           
       # Read next byte stream           
       $received = $rd.GetBytes(1, $start, $out, 0, $bufferSize - 1);           
    }           
           
    $bw.Close();           
    $fs.Close();           
}           
           
# Closing & Disposing all objects           
$fs.Dispose();           
$rd.Close();           
$cmd.Dispose();           
$con.Close();           
           
Write-Output ("Finished");

Thanks,
André
Tags
WebParts for SharePoint
Asked by
André
Top achievements
Rank 1
Answers by
Rumen
Telerik team
André
Top achievements
Rank 1
Share this question
or