Telerik provides the RadEditor for MOSS in a Solution package (*.wsp). This solution contains two Features, which are scoped to be installed at the Web level of a SharePoint farm.
While this type of installation is quite functional, it means that every time a Site (Web in the Object Model) or Site Collection (Site in the Object Model) is created, its administrator would need to remember to activate the solution.
The Telerik website specifies a workaround for this shows you how to modify the two Telerik Features (RadEditorFeatureRichHtml and RadEditorFeatureRichText) by doing the following:
- Turning off the Features
- Altering the Feature Scope for each in the Feature.xml file
- Turning the Features back on
While this works fine, these steps did not meet my requirements - if the Solution that created the Features is reinstalled or modified, the feature.xml for each would be overwritten from the contents of the Solution. This would revert the scope back to Web instead of Site, which is not acceptable.
I specifically wanted to make this change more permanent such that it could survive the reinstallation of the solution (by the way, this works with the trial version of RadEditor). The only alternative was to modify the solution. To do so:
a. Make an archival copy of the original solution from Telerik. This document assumes that the copy is NOT named RadEditorMOSS.wsp.
b. Rename the RadEditorMOSS.wsp file to RadEditorMOSS.cab.
c. Open the RadEditorMOSS.cab file using WinZip (Not the built-in Windows Unzip). If you choose to use the builtin Windows Unzip, this process will not work because (a) the file structure will be gone and (b) the feature.xml for one of the two features will overwrite the other.
d. Choose to extract all files to a location of your choosing. For illustration’s sake, we will choose the location as C:\Downloads\Telerik\RadEditorMOSS_5_3_2\RadEditorMOSS.
e. Open the RadEditorMOSS directory and then open the RadEditorFeatureRichHtml directory. In it, you will see one Feature.xml file.
f. Open it in an editor of your choosing (VS2005/2008, Notepad++, etc.) - Don't use NotePad, it may leave artifacts and hidden characters in the file.
g. Find the Line that reads 'Scope="Web"' and change it to read 'Scope="Site"'.
h. Repeat steps e-g for the RadEditorFeatureRichText directory.
i. IMPORTANT - These files need to be reassembled back into a CAB file, but you cannot use WinZip for this task. If you do so, all will be well until you try and install the solution, at which time you will get an error that reads "Failed to extract the cab file in the solution".
j. Download and install the cabdsk.exe utility (to c:\Program Files\Cabdsk) from the Microsoft Cabinet Software Development Kit (see http://support.microsoft.com/kb/310618 and http://kopperla.blogspot.com/2008/10/how-to-replace-files-in-sharepoint.html).
k. Open a command prompt and navigate to the c:\Program Files\Cabdsk directory.
l. Issue the following command: cabarc n RadEditorMOSS.cab C:\Downloads\Telerik\RadEditorMOSS_5_3_2\RadEditorMOSS\*.*.
m. Issue the following command: cabarc -r -p -P downloads\telerik\RadEditorMOSS_5_3_2\RadEditorMOSS n RadEditorMOSS.wsp c:\downloads\telerik\RadEditorMOSS_5_3_2\RadEditorMOSS\*.*.
n. Copy the finished RadEditorMOSS.wsp file from c:\Program Files\Cabdsk to c:\download\telerik\RadEditorMOSS_5_3_2\.
o. Delete the C:\Downloads\Telerik\RadEditorMOSS_5_3_2\RadEditorMOSS directory that was created by unzipping the original file.
At this point, you can simply follow the instructions for activating the Solution and Features (at the Site Collection) as shown on the Telerik web site.

1 comments:
Awesome post... two for one; "Changing the Scope of the Telerik RadEditor Features" and "How to Modify an Existing WSP (SharePoint Solution Package)"
Post a Comment