Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a farm solution with a single feature that has a bunch of site columns and a content type.

The content type does inherit from Enterprise Wiki Page, but the feature has an activation dependency on the Publishing Site Collection Feature.

I'm getting the error in the title upon activating the site-scoped Feature.

At first I thought this was a Visual Studio 2010 problem, not retracting the solution from a previous build error I had or something.

But this will not deploy even to a new site collection, giving the error:

The field with Id [GUID] defined in feature [GUID] was found in the current site collection or in a subsite.

I've manually removed it from Farm Solutions in CA, added it manually, deployed it manually, but still getting the error when trying to activate my Site Collection Feature.

Here's the field it's actually complaining about:

<Field ID="{522D25C2-2826-46A2-BCAE-A8B0A6BFE476}"
        Name="Tab1Link"
        DisplayName="Tab 1 URL"
        Type="URL"
        Group="A Group"
       />

Am I missing something?

EDIT:

I'm adding to the content type like so:

<FieldRef ID="{522D25C2-2826-46A2-BCAE-A8B0A6BFE476}" DisplayName="Tab 1 URL" Name="Tab1Link"/>
share|improve this question
    
Sounds oddly like a circular feature dependency (trying to double-activate this feature). Or am I just stating the obvious? –  Stuart Pegg May 25 '11 at 18:49
    
Only got one feature dependency and that's on the site collection feature... –  James Love May 25 '11 at 18:53

1 Answer 1

up vote 4 down vote accepted

There must be an existing field with that Guid in your content database. Have you tried it with a different Guid? Or possibly there is a field with the name Tab1Link but a different display name, or hidden. You might try a different name also.

share|improve this answer
    
Might try changing the GUIDs, this does happen on new site collections, but my dev VM only has one Content DB, so there could be something in it. –  James Love May 25 '11 at 18:54
2  
Well god damn, it bloody well works now (after changing the guid). –  James Love May 25 '11 at 18:55
    
I've run in to what was probably the same issue in the past. Retracting your solution doesn't seem to remove the Guid from the content database, so when you re-deploy it (rather than updating it), it sees that the Guid is already there. –  Tim Gabrhel May 25 '11 at 19:12
    
Also: Overwrite="TRUE" –  Dennis G Jul 1 '13 at 22:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.