Sharing the experience search

Search sharing-the-experience.blogspot.com

Monday, May 20, 2013

Test-SpContentDB MissingFeature, MissingSetupFile, MissingWebPart, MissingAssembly. And not so Fabulous 40 templates.

I am on verge of finally get my farm migrated to SP2013 on-prem.
I was suffering with cleaning customization by not so fabulous for me  "Fabulous 40  templates".

I ended up transferring content from customized sites to OTB sites and deleting sites based on the custom site definition.
Then I de-activated features and de-installed custom wsp.

Once I have done that part, I ran test-spcontentdb on my current prod SP2010. To my surprise I got a lots of errors:
MissingFeature, 
MissingSetupFile, 
MissingWebPart, 
MissingAssembly

I have started analyzing the log and discovered that all missing customization are part of Fab 40!

Btw, Fab 40 has a lots of features that start with 75a0fea7 (Here is a quick and dirty look on customization by MS - List of Features with GUIDs)


Now, this post is intended to help some unfortunate souls who suffer from such behavior.

Obvious question in this situation: How can I get rid of MissingFeatures, MissingSetupFile, MissingWebPart, MissingAssembly?

Here is what I did:

1. I have started with Stsadm -o enumsites -includefeatures to find missing features and remove them via  SharePoint Feature Administration and Clean Up Tool

2. I have run following PowerShell commands that have mentioned : Removing [MissingFeature] Database & [MissingWebPart] WebPart class errors from SharePoint 2010
    These PS commands helped me with most MissingFeatures. But MissingSetupFiles, MissingWebParts, MissingAssemblies errors were still in place.
Then I moved to another step of cleansing:

3.I had to clean SQL tables directly based on the following articleFixing Test-SPContentDatabase warnings
In my case sp object were already deleted, but for some reason sql tables still have rows with no corresponded SharePoint objects. So, I had to delete records directly in SQL.
I know, I know, it's not recommended, but I didn't get another option....

4. Still got MissingAssembly. So, I used this script: REMOVE ORPHAN EVENT HANDLERS IN SHAREPOINT LISTS
And once again, in my case I didn't find correspoded to SQL record SharePoint object and had to delete records directly from EventReceivers table.

Thursday, May 2, 2013

Simple Concept: List View How to add context menu to the column?

[Question]: I want to add a context menu and a link  in the list view on the column that is NOT a default "Title" column. How can I do it?

[Answer]:
You can either
1. implement xsltviewwebpart  (which is tedious task);

2. or you can using PowerShell set up special attributes to the field that you want to add a context menu and a link. 

I personally prefer the second approach. It allows a user to create a view over and over again and he\she will get the same behavior - a context menu and link to a specific , not a default title column.

Here is a simple magic:

 You have to add a following attributes to a desired <Field :

        LinkToItem="TRUE"
        LinkToItemAllowed="Required"
        ListItemMenu="TRUE


 Using PowerShell it will look like this:


$Lst = get-Splist "{full url}"
$Fld = $projFld.getField("{field static name}")                                                                                                                                                                                                                     


#Save original Schema for backup purposes


$Fld.SchemaXml >> fldbkp.txt


#open fldbkp.txt. Copy the content over to the notepad.
#Add attributes LinkToItem="TRUE" LinkToItemAllowed="Required" #ListItemMenu="TRUE". 
#Replace '"' with '''.Copy content


$Fld.SchemaXml ="{your copied edited field caml}"
$Fld.Update()
$Lst.Update()

Wednesday, March 27, 2013

Monday, March 25, 2013

SharePoint 2010 to 2013 Upgrade: Service Accounts

As you may know there is no in-place upgrade for SharePoint 2013.
You have to build a new SP2013 farm and then bring your content from SP2010 over.

One of the first steps of the upgrade is to plan service accounts that you will use in the new SP2013 farm.
Here is an excellent article by Todd Klindt that will help you with that: Service Account Suggestions for SharePoint 2013

And another excellent and short list of recommended service accounts by Margriet Bruggeman: SharePoint 2013 Best Practices: Service Accounts

Here is an original recommendation from Microsoft:
 Initial deployment administrative and service accounts in SharePoint 2013
 Plan for administrative and service accounts in SharePoint 2013

And a final touch: How to create a SharePoint 2010 admin account and stop using sp_farm

Friday, March 22, 2013

SharePoint 2010 on Cloud. SaaS vs IaaS

Ever wonder how can you move your on-prem SP farm to the cloud? And what is cloud anyway?
 As of 03/22/2013 you have 2 options of cloud-solution for SharePoint:
- Office 365 that deliver bunch of MS products , one of them is SharePoint Online.
This is a classical example of SaaS.
- WIndows Azure VM. 
This is a classical example of IaaS.
Here is a good pic to describe SaaS (Software as a Service), PaaS (Platform as a Service) and IaaS (Infrastructure as a Service):

In the context of SharePoint migration to the cloud, you need to understand that SharePoint Online delivers the latest version of SharePoint
What is the implication? You have to be totally ready to move SP2013 .MS doesn't offer a mean to move data from your on-prem to SharePoint online.
At this moment I haven't tried any 3d party tools for this purpose yet.
Also, your farm should not have farm solutions. SharePoint Online doesn't support farm solutions. And it doesn't support reporting services at this moment.

Windows Azure VM gives you more flexibility. You can choose what version of SharePoint you want to run, and you have a full control to administer the system. More on SharePoint Deployment on Windows Azure Virtual Machines

But also it means you have to have a resource to support the system.
And by the way, wonder how can you cut the cost? I wonder too)
At this moment, it's interesting to know that:
Virtual machines continue to incur compute charges even when they are stopped You can avoid these charges by deleting the virtual machine.
BTW, in case you want to automate SP installation process, try this - http://autospinstaller.codeplex.com/

Thursday, March 21, 2013

SharePoint 2010: Confirm site use and deletion. How to restore Site Collection ?

One big part of  the migration to a new version of SharePoint is a preparation phase.
This phase emphasizes cleaning or pruning the environment before moving content database (  in case of SharePoint 2013 Upgrade you don't have in-place upgrade option) to a new version.

I recommend to clean from top to bottom.
First, identify unused web applications. (SP Migration: Phase I "Cleaning". Unused web applications )
Then check unused site collections.
At this step, I recommend to make use of "Confirm site use and deletion"




Of course, you can still use this option even you are not planning the upgrade but still feel urge to get of rid of "dead" structure and content.

I found a useful article that explain in detail how this feature works - A Closer Look At “Site use confirmation and deletion”…
As this post mentioned, it's good to know that :
As of the June 2012 CU for SharePoint 2010, the Dead Site Delete timer job now calls proc_DeleteSiteAsync which is explained below - this is good news, and now means that sites deleted by site use conformation and deletion will be subject to the site Recycle Bin.
Let's explore June 2012 CU (build 14.0.6123.5002):
It has resolved issue 2598348 Description of the SharePoint Foundation 2010 hotfix package (Wss-x-none.msp): July 2, 2012

From http://support.microsoft.com/kb/2598348
If a site is deleted by a dead site delete timer job, the site is deleted permanently. Instead, the site should be sent to the Site Collection Recycle Bin.

So, based on this knowledge you can now check 'Automatically delete the site collection if use is not confirmed' with less struggles in your mind.

And btw, Where is Site Collection bin? Here is the asnwer:
SharePoint 2010: SP1 Site Collection Recycle Bin (en-US)