Getting a weird error that only seems to affect some of my web parts.

I have a web part page on a subsite that's got its Shared Documents on there. The webpart works as expected if you click on the link to the Shared Documents list, or if you click on a file.

If you click on a folder, however, you get the

An unexpected error has occured

screen with a Correlation ID.

When I dig into the logs, I find that correlation ID lines up to a number of lines of information which seem to be surrounding this stack trace:

System.ArgumentException: Value does not fall within the expected range.    at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)     at Microsoft.SharePoint.SPWeb.GetItem(String strUrl, Boolean bFile, Boolean cacheRowsetAndId, Boolean bDatesInUtc, String[] fields)     at Microsoft.SharePoint.SPList.EnsureCurrentFolderInfo()     at Microsoft.SharePoint.SPList.DoesUserHavePermissions(SPBasePermissions permissionMask, Boolean checkFolder)     at Microsoft.SharePoint.Utilities.RightsSensitiveVisibilityHelper.UserHasRights(PermissionContext permissionContext, SPBasePermissions permissions, PermissionMode permissionMode, SPContext context, SPWeb contextWeb, SPList contextList)     at Microsoft.SharePoint.Utilities.RightsSensit...

which makes me think the folder perhaps doesn't exist (despite being rendered by SP), except that if I go to the actual List, I can click into the folders just fine.

I tried making a new view for the web part to use, but any editing of the web part returns an error that

List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user.

That doesn't strike me as possible, given that the webpart renders and the list in fact does exist.

Any ideas?

  • Paul - did you solve this? I'm getting a very similar problem: - just the webpart, not from the doc library link - same error message - but no problem creating new list Hope someone else has ideas. Ben – bjh Oct 2 '15 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.