19 November, 2013

Unable to save site as template + unexpected error has occurred

Here we go, it’s been a long time I didn’t publish an article which consist of hardcore troubleshooting! Yes, you are correct. It took some time to resolve but finally the issue has been resolved. This time it’s regarding problem occurring while ‘save site as template’ and how we found the culprit.

Problem description:-
User has raised the problem ticket by mentioning “facing problem while saving the site as template”, additionally the templates are getting saved in the solution gallery but not able to activate it also.

Error message:-
An unexpected error has occurred.

Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: acd95f50-4049-4625-9682-aa93aded118f

Troubleshooting done:-
Further debugging in the SP ULS logs and we found some strange facts which are based on event receivers- please refer below-

SPSolutionExporter: Microsoft.SharePoint.SPException: Feature definition with Id 77658379-50ff-4e1e-a431-5652bee07a87 failed validation

Looking for 'ReceiverAssembly' attribute in manifest root node for solution

Looking for 'ReceiverClass' attribute in manifest root node for solution

The 'Format' attribute is invalid - The value 'CheckBoxes' is invalid according to its datatype

I debug further to find out where the problem is-

I downloaded the saved wsp's from  /_catalogs/solutions/Forms/AllItems.aspx to my desktop

Renamed it to .cab

Extracted all the contents and found some interesting facts along with manifest.xml file like-

1.      List Instances
2.      Modules
3.      Property bags
4.      web template

Inside List Instances, I found ElementsFields.xml

Once i opened the above xml file, search for the checkboxes and found the following-

Further exploration on this, it seems that the checkbox attribute is invalid and needs to be modified.

Resolution:-
After this one, the solution is pretty much simple, just go ahead and remove that affected column / remove the affected content type – does not require IISRESET also.

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issue, Thank you.

13 November, 2013

Item level permissions in SharePoint: User should add/edit/read only their own items- SharePoint 2010.


A user requested that he need to have a permission configured on the item level where used can see only their own documents or can read all the items in the list.

As a SharePoint admin the though had some to my mind are:

? Simply deny as it’s only possible with Survey list in SharePoint 2007.

? Can have created a custom list but would be a tedious task.

? Can use the target audience feature but that would be with a complex configuration.  

However, as I was exploring the features of SharePoint 2010, I checked configuration on the List settings of SharePoint 2010 Platform and MS has done a great job to extend the feature from Survey list to all types of list in SharePoint 2010.

You can configure Item level permissions in one go.  You can go to List Settings -> Advance Settings and Item- Level Permissions.


You can also use PowerShell Script to manage the item level permissions:

Manage Read Access:

$SharePointSite = Get-SPWeb http://amar.com/
$list = $web.Lists[“Library Name”]
$list.ReadSecurity = 1
$list.Update()
$SharePointSite.Dispose()

Note: 1 = “Read all items”, 2 = “Read items that were created by the user”

Manage Write Access:

$SharePointSite = Get-SPWeb http://amar.com/
$list = $web.Lists[“Library Name”]
$list.WriteSecurity = 1
$list.Update()
$SharePointSite.Dispose()

Note:  1 = “Create and edit All items”, 2 = “Create items and edit items that were created by the user” 4 = “None”

If you have any queries/questions regarding the above mentioned information then please let me know.

I would be more than happy to help you as well as resolves your issues, thank you.

Applies to: SharePoint Foundation Server 2010, SharePoint Server 2010.

10 November, 2013

SharePoint: "The storage space allocation page cannot be used for sites that do not have a storage quota defined"

Issue: User was getting error message below while accessing the Storage Space Allocation page:

The storage space allocation page cannot be used for sites that do not have a storage quota defined.


Background:

While doing some regular clean-up of the sites which are over quota, I noticed that site is not having the Site Storage Allocation page in the Site collection administration page, which was quite strange though.
Accessing storage page directly via _layouts/storman.aspx page, shoes the above error message.
Troubleshooting:

Checked the same behaviour on the other site as well and it was not the same.
Tried to activate and deactivate the Office Publishing feature. Storage Allocation link was still not appearing. 


Resolution:
Checking the site storage quota we have noticed a much wired thing is that the site was given quota or you can say it was set to be 0 MB with Warning level of 0 MB.
Not sure that was done, seeming like a human error obvious.
Set the correct quota for the site and Site Storage Allocation page was back.

Applies to Products:
 SharePoint 2007, SharePoint 2010, SharePoint Server 2013


Error: The Compressed (zipped) Folder is invalid or corrupted in SharePoint 2007.

Issue: Whenever my client tried to open a .zip files from SharePoint it throws the below error message.

Background: One of my clients had zipped the .excel files in on his local desktop and uploaded to SharePoint site. There files contains the project level information and was needed to extract after two years. When he clicked the file to open from SharePoint had encountered the issue.

Now the task begins of a SharePoint admin.

Troubleshooting:

Tried to open the file from SharePoint site, no go.

Downloaded the file on desktop of the client, no go.

Tried the same steps at my end, no success.

Strange this accessing file on SharePoint server also does give the same error.

With the above basic stuff, it was clear that it is something to deal with the zip file itself as it doesn’t seems to be SharePoint issue anymore.

Being a digger try to dig some more in it and seems like something to deal with the excel documents zipped may be was in protected mode.

Client was having no clue for this.

Resolution: Tried to find the Repair tool on the internet and million thanks to Christina Marley who created a zip file repair utility which when ran has repaired the file and is available for download here.
http://gallery.technet.microsoft.com/The-Compressed-Zipped-d39407b2

Asked the user to download the files and repair them with the utility.

If you feel any difficulty in understanding the tool or have any query I would be happier to help you.

Applied to: SharePoint 2007, WinZip, and WinRAR. Windows XP.

04 November, 2013

The operation that you are attempting to perform cannot be completed successfully

Problem description:
We have received the following error message while creating the site collection underneath one web application.

Error message:
The operation that you are attempting to perform cannot be completed successfully.  No content databases in the web application were available to store your site collection.  The existing content databases may have reached the maximum number of site collections, or be set to read-only, or be offline, or may already contain a copy of this site collection.  Create another content database for the Web application and then try the operation again.


Troubleshooting done:-
If you see the error message then you will experience it is somewhat misleading. How?
See-
1)     Checked the content database is attached or not [By means of Central Administration] - Yes, it’s already there.
2)     Checked the maximum & minimum site collection number and its already max 5000 and min 2000. The actual numbers of site collections are only 50! Strange!
3)     Checked the status of web application – whether its Read Only / content prevented/locked/unlocked [By means of Central Administration]
4)     Checked the status from SQL end and it was fine.

This issue can be resolved in multiple ways-

Resolution:-
1)     Create a new content database and check new site collections are getting created or not.
2)     You can also test this by creating a site collection in a different web application – By this way you are trying to isolate the problem. Whether it’s restricted to single web app/single content database/complete farm.
3)     Check the database status –
                                i.            Central administration
                              ii.            Application management
                            iii.            Manage content databases
                            iv.            Select the appropriate web application from the dropdown
                              v.            Check the status
                            vi.            In my case, it’s showing error

Note: I would like to highlight that the above mentioned ‘error’ status does not make any impact on the existing site collections so nothing to worry about it.

4)     Execute IISRESET and check the results
5)     Check the status from the SQL end and make sure there is no problem with the logs as the database consists of mdf and ldf files, this problem might be occur due log files gets full!

In my case, it’s showing the database status as “Error” so I performed the following steps-
1.      Detach the content database from the web application
2.      IISRESET
3.      Attach the content database back & check the results.

Now site collections can be created without any problems!

Issue resolved! Happy SharePoint…

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Reference:


Product applies to:
1)     SharePoint Server 2010
2)     SharePoint Foundation 2010