Error message “Unable to access web scoped feature because it references a non-existent or broken web on site” when performing feature upgrade

I got the error message below when performing a feature upgrade on a web-scoped feature:

Unable to access web scoped feature (Id: 0257689c-9e69-4700-a169-004f648d0924) because it references a non-existent or broken web (Id: 90d6c515-a4a7-4f25-a46d-d0505e54d973) on site ‘http://myServer’.  Exception: System.ArgumentException: Value does not fall within the expected range.

   at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)

   at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)

The error occurred when I attempted to enumerate the results of SPSite.QueryFeature(). The second Guid appears to be the ID of a web, but there were no webs in my site collection with that ID (hence the error). I noticed there were some deleted sites in the Site Collection Recycle Bin. I emptied this Recycle Bin and was then able to upgrade the feature successfully.

The feature I’m trying to upgrade was activated at these deleted sites (before they were deleted).

Advertisements

About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in Feature Upgrade, SharePoint 2010. Bookmark the permalink.

4 Responses to Error message “Unable to access web scoped feature because it references a non-existent or broken web on site” when performing feature upgrade

  1. micliz says:

    I love you! Thanks for posting this.

  2. julian says:

    Hi, I have the same issue.
    But I don’t have deleted webs in my site recycle bin…and I don’t know what else I can do about this.
    Regards!

  3. jp says:

    Thanks, I didn’t think about it before seeing this.

  4. Ahmed Amin says:

    Thanks this solved my issue

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s