SharePoint MOSS 2007 - Troubleshooting Content Deployment Warning “A Web Part or Web Form Control type could not be found…”

2 minute read

After a recent deployment, we ran into a problem on our production and development farms where on every full or changed-only deployment, the following warning was being reported multiple times, listing unknown WebPart GUID's...

"A Web Part or Web Form Control type could not be found, or is not registered as safe. The Web Part will still be exported."



The really bad part is, these warnings show up as errors in the windows application log in the event viewer, which server administrators might over react to >_> So, lets look at how to troubleshoot these guys to make our server administrators happy...

Those listed unknown object GUID's are not the assembly GUID, but the SharePoint object id, which is just some random sharepoint key to identify the webpart in the database.

To troubleshoot, we took these sharepoint GUID's and looked through the SharePoint content deployment cab file. You can find that file path in the receiving publishing farm central admin under Operations->Content Deployment Settings. The path is on the server running the central admin site. In that directory, you'll find a directory for every deployment job thats been run successfully, and each one should hold a file named ExportedFiles1.cab. Extract that cab file to get at the manifest files for the deployment, you should end up with a set of files similar to the following:



These files hold the list of SharePoint objects, their GUID's and their more human readable properties. A snip of a sharepoint object in the manifest might look like this:


<SPObject Id="522e912c-13c7-43fe-aa0c-0966a859ed40" ObjectType="SPFile" ParentId="2b411f12-5969-426c-8225-e6a37ce8d6fd" ParentWebId="15d8b8b9-7b64-4b31-b3eb-24105b31725d" ParentWebUrl="/unc" Url="/unc/Pages/unsubscribe.aspx">

        <File Url="Pages/default.aspx" Id="522e912c-13c7-43fe-aa0c-0966a859ed40" ParentWebId="15d8b8b9-7b64-4b31-b3eb-24105b31725d" ParentWebUrl="/" Name="default.aspx" ListItemIntId="10" ListId="c52ee1b1-b21b-4b02-9f0e-7191842cde77" ParentId="2b411f12-5969-426c-8225-e6a37ce8d6fd" TimeCreated="2008-10-28T15:42:07" TimeLastModified="2008-12-08T23:14:18" Version="2.0" FileValue="00000809.dat" Author="2" ModifiedBy="14">

            <Properties>

        ...

            </Properties>

            <WebParts>

                <WebPart Name="e31419c7-3102-439b-8130-dc415519e690" PerUserProperties="/wEUKwAJAgICAwIBAQAAAgQChAELKjFTeXN0ZW0uV2ViLlVJLldlYkNvbnRyb2xzLldlYlBhcnRzLlBhcnRDaHJvbWVUeXBlAgIEBRZOQ1NfU0NfVW5zdWJzY3JpYmVGb3Jt" Level="major" WebPartZoneID="CenterColumn" WebPartTypeId="9a200b30-1bd5-a97f-03d6-907ef144236b" IsIncluded="false" WebPartOrder="0" FrameState="0" />

                <WebPart Name="953dce8d-74af-4c9d-a6af-10b69c126fef" PerUserProperties="/wEUKwAJAgICAwIBAQAAAgQChAELKjFTeXN0ZW0uV2ViLlVJLldlYkNvbnRyb2xzLldlYlBhcnRzLlBhcnRDaHJvbWVUeXBlAgIEBRZOQ1NfU0NfVW5zdWJzY3JpYmVGb3Jt" Level="major" WebPartZoneID="CenterColumn" WebPartTypeId="d91efffd-abdb-2f1b-d394-8683cb14a5dc" IsIncluded="true" WebPartOrder="0" FrameState="0" />

            </WebParts>

    ...



These SPObject elements should give us enough info to find the page/file causing deployment problems. In the example above, I found that the WebPart with the SharePoint object id of e31419c7-3102-439b-8130-dc415519e690 had been "closed" rather than deleted from a page, and I had later removed the webpart from the web.config and the bin directory, which was causing the problem.

To remove the closed webpart was a bit tricky, I had to edit the page reported in the SPObject element, browse for a Web Part, add the closed Web Part to a Web Part Zone on the page and then delete it from the page....





Make sure you do an Edit->Delete rather than clicking the X in the right corner of the Web Part pane...



Once you've found and fixed all these issues, you will probably want to do a full content deployment of the entire collection. I usually still get warnings/errors with the first deployment after making this kind of change, but deployments after that work fine.

Tags:

Updated: