I
have got many issues while working on SharePoint 2007/2010. Here are few
and main basic issues I am sharing:
1. This
view cannot be displayed because the number of lookup and workflow status
columns it contains exceeds the threshold enforced by the administrator
- http://sharepointmalarkey.wordpress.com/2012/03/05/this-view-cannot-be-displayed-because-the-number-of-lookup-and-workflow-status-columns-it-contains-exceeds-the-threshold-enforced-by-the-administrator/
- http://sharepointfoundation2010.blogspot.in/2010/11/troubleshooting-this-view-cannot-be.html
2. No
item exists at... It may have been deleted or renamed by another user.
- Ans: Don’t use the “ID” (use except this).
- e.g. http://intranet/mysite/Testpage.aspx?UID=1
- Ref: http://praveenbattula.blogspot.com/2010/02/sharepoint-exception-no-item-exists-url.htm.
3. Invalid data has been used to update the list item. The field you are trying to update may be read only.
- Sol: The above error will come when updating a list; you can't insert a string value into a lookup field. You must insert the ID of the list item in the source list.
- Reference: http://sharepointguys.com/matt/sharepoint-2007-development/splookupfield-helper-function/
4.
Cannot connect to the configuration database?
- I got this error suddenly when I tried to open the site.
- Sol: The problem is the Sqlserver DB servers are in off mode. So, start the below list of servers to work.
- Go to “Run” commandàenter “services.msc”àstart the “SQL Server (MSSQLSERVER) and SQL Server Agent (MSSQLSERVER). Refresh the site…
5. Code
Blocks are not allowed in this file.
- Error: I have created site pages through SharePoint designer and added the inline code inside of “Script” tag and after that if I tried to view this page I got this error “An error occurred during the processing of /Pages/Sample.aspx. Code blocks are not allowed in this file”.
- Affected files: i.e. Master pages and Page layouts.
- Reason: SharePoint disables the ability to create server-side script by default; you have to turn it on. To get this working you need to modify the web.config of your web application.
- Sol:
//To allow script code to the specific page
<
PageParserPaths >
< PageParserPath VirtualPath=”/Pages/Sample.aspx” CompilationMode=”Always”
AllowServerSideScript=”true” />
//To allow script code to all the pages
<PageParsePath VirtualPath=”/Pages/*” CompilationMode=”Always”
AllowServerSideScript=”true” />
<
PageParserPaths >
//To allows Script to the Master Pages.
<PageParserPaths>
<PageParserPath VirtualPath="/_catalogs/masterpage/Sample.master" CompilationMode="Always" AllowServerSideScript="true" /> </PageParserPaths>
//To enable code blocks on a Folder
<PageParserPath
VirtualPath="/TeamSite/CustomForms/*"
CompilationMode="Always"
AllowServerSideScript="true"
IncludeSubFolders="true"/>
|
- “AllowServerSideScript, IncludeSubFolders” are self-explanatory and “CompilationMode” attribute have the following options
- Always – The default value, which compiles the page always
- Auto – Page will not be compiled if possible
- Never – The page will not be dynamically compiled
6. This
solution contains no resources scoped for a web application and cannot be
deployed to a particular web application
- Sol: The above issue will occur if your solution does not contain assembly information (means no GAC files) to the scoped to the web application.
- Sol: stsadm –o deploysolution –name “Sample.wsp” –local –allowgacdeployment –force
7.
Object reference not set an instance.
8.
Invalid data has been used to update the List Item. The field you are trying to
update may be read-only field.
- Sol: In SharePoint, “Created By” and “Modified By” fields (columns) are read-only fields. These two read-only fields are built-in field for every list and library. We cannot directly update/Modify read only field, if you try to Update/Modify you will get the below error.
- “Invalid data has been used to update the List Item. The field you are trying to update may be read-only field”.
- Sol: we can do changes on “Read-Only” fields using internal names.
- Internal name of “Created By” field is “Author” and “Modified By” field is “Editor”
SPList
ListName= CurrentWeb.Lists[“ListName”];
SPListItemCollection
lstitemcollection = ListName.Items;
Foreach(SPListitem
listitem in lstitemcollection)
{
SPFieldUservalue user1=new SPFieldUservalue(CurrentWeb,
CurrentWeb.Currentuser.ID,
CurrentWeb.Currentuser.LoginName)
ListItem [“Author”]=user1;
ListItem [“Editor”]=user1;
ListItem.Update();
|
9.
Operation is not valid due to the current state of the object when making
changes to SPListItem object using Elevated Privileges?
- Sol: This issue will get when running “SPListItem.Update command” inside of the “SPSecurity.RunWithElevatedPrivileges” block.
10.
"The farm is unavailable” message
11.
SharePoint Connection Error in Visual Studio 2010.
- Cannot connect to the SharePoint site: http://zyspsdev:8888/. Make sure that the Site URL is valid, that the SharePoint site is running on the local computer, and that the current user has the necessary permissions to access the site.
- Additional information:
- "Cannot connect to the SharePoint site: http://zyspsdev:8888/. Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project."
- Ref: http://sharethelearning.blogspot.in/2010/05/sharepoint-connection-error-in-visual.html
- http://geekswithblogs.net/shehan/archive/2010/11/16/error-creating-sharepoint-project-in-visual-studio.aspx
12.
Choice column not supported for lookup field.
- http://bramnuyts.be/2011/04/05/using-a-lookup-field-on-a-choice-field-workaround/
- http://www.myfriedmind.com/techBlog/2011/08/04/Sharepoint2010HowToUseListEventsToSetAColumnsValueUsingVisualStudio2010C.aspx
13. The query cannot be completed because the number of
lookup columns it contains exceeds the lookup column threshold enforced by the
administrator.
14. Error occurred in deployment step ‘Retract Solution’: The local SharePoint
server is not accessible. Check that the server is running and connected to the
SharePoint farm.
Please
share your experience to keep all issues in at one place.
Thanks
for reading..
No comments:
Post a Comment