The ‘NoCrawl’ attribute is not allowed

Ok, so this is one of those annoying errors which make you think about Microsoft QA and QC. Simple scenario: I create a basic site (meeting workspace in this case), chanage one or 2 lists with no complicated features.

I save the site as a site template and then go to Site Settings\Solution Gallery where I need to activate the new site (feature).

Up pops the error: “Feature definition with Id xxxxxxxxxxxxxxx failed validation, file ListInstances\ElementsFields.xml, line 321, character 325: The ‘NoCrawl’ attribute is not allowed

Probably one of the most simplistic features in Sharepoint and it does not work. Search for feature xxxxxxxxxxxxxxx with no success. Final solution is related to a NoCrawl property as specified in the exception.

The fix is to do the following (not great as you have to change files in the 14 hive which is never good):

Find and edit wss.xsd file located at c:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\XML (on the web server that is hosting the site if you run in a web farm)

Find the following line: <xs:complexType name=”FieldDefinition” mixed=”true”>¬†and at the end of all underlying attributes and just before the line:

<xs:anyAttribute namespace=”##other” processContents=”lax” />

add this line: <xs:attribute name=”NoCrawl” type=”TRUEFALSE” />

Do an IISRESET and try to activate feature again

2 thoughts on “The ‘NoCrawl’ attribute is not allowed

    • Keith Reply

      Just encountered this. Thank you for taking the time to post and saving me MS therapy costs… Worked like a charm!

Leave a Reply

Your email address will not be published. Required fields are marked *