Showing posts with label SharePoint2010. Show all posts
Showing posts with label SharePoint2010. Show all posts

22 April, 2014

The SPListItem provided is not compatible with a Publishing Page

Problem description:
I was facing this error while submitting information via list view webpart, additionally problems with the check-in – checkout functionality.

Note:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Error message:
The SPListItem provided is not compatible with a Publishing Page

ULS Logs Findings:
System.ArgumentException: Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page.    at Microsoft.SharePoint.Publishing.PublishingPage.GetPublishingPage(SPListItem sourceListItem)     at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageStateControl.RaisePostBackEventForPageRouting(String eventArgument, SPRibbonCommandHandler control, RaisePostBackEventDelegate raisePostBackEventDelegate)     at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageCheckinHandler.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)b3c1032c-e249-4879-82f6-02e4b3db028c

Troubleshooting done:
o   Checked the ULS logs
o   Tried changing the master page but didn’t resolves the issue
o   Checked with different templates but that also showed the same error message
o   Tried replicating on different web application but same results i.e. same error!

As you can see the error message itself saying that there is some relation with the publishing functionality so what you can do to resolve this issue? Here are the details.

Resolution#1:
1.   Open your SharePoint site
2.   Site actions
3.   Site Settings
4.   Manage site features
5.   Deactivate “Publishing Infrastructure” feature – scope is WEB

Once that done, we need to repeat the same steps at the site level (scope is different)
1.   Site ->Site actions->Site settings
2.   Site collection administration
3.   Site collection features
4.   Deactivate “Publishing Infrastructure” feature
Bottom line: we have deactivated “Publishing Infrastructure” feature at the web as well as site level.

Now, let’s re-activate the same feature one by one (order will be different this time) i.e. site scope first and then web scope.

If the above steps don't resolves the issues then please use the following script to resolve it.

Resolution#2:
$web = get-spweb "http://site-collection/URL-of-the-problem-site"
$correctId = $web.Lists["Pages"].ID
$web.AllProperties["__PagesListId"] = $correctId.ToString()
$web.Update()
$web.AllProperties["__PublishingFeatureActivated"] = "True"
$web.Update()

That’s it – done!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.

Product Applies To:
v  SharePoint 2010
v  SharePoint 2013

17 April, 2014

InfoPath form library forms cannot be filled out in a Web browser

Today I was monitoring the SP servers along with some regular sanity checks that need to be carried out on daily basis. While doing that, I noticed one error based on this InfoPath rendering in the Health check analyzer!  But let me tell guys InfoPath is perfectly working in our environment without any issues and nobody has reported any incident also then why this error is showing in the health analyzer? – you must be thinking the same but no need to worry about as this is not a big one which will take lot of your time, some minor checks and you are done.

Error message:
InfoPath Forms Services forms cannot be filled out in a Web browser because no State Service connection is configured.

If this is your new configuration then you need to follow this existing official documentation from Microsoft which is pretty awesome!

In our case, we have already done this configuration long time back and as I said, it’s working fine. The error message is little bit misleading one as its asking you to check the “state service” service application to be online or not but that’s not the case. We have already configured this service application long time back so where exactly the issue is and why it’s throwing the error?

Let me tell you the trick which we sometimes ignored – Look out the error in the HAL rule – see the below:


You will notice that it’s also giving you the URL of the web application for whom its failing and name of the servers also.

In our case, we have recently created a new web application in the farm and its been reflected in that! What it means? Pretty simple – the ‘state service’ service application is not configured for the same.

So what we need to do now for this re-association? Here are the details:

Resolution:
1.   Open the central Administration
2.   Application management
3.   Service applications
4.   Configure service application associations
5.   Select the web application for whim it’s failing
6.   Click on custom
7.   It will open the service application options
8.   Select the state service check box and click OK

Once you are done with the above steps then come back to health analyzer list, click on the same rule and hit “Reanalyze now” – that’s it, you are done.

That error won’t be there! Happy SharePoint once again…
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.

Note:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Product Applies To:
o   SharePoint 2010
o   SharePoint 2013
o   SharePoint Foundation 2013
o   SharePoint Foundation 2010

15 April, 2014

Cannot uninstall Language Pack 0 because it is not deployed

SharePoint 2013 is really a good product w.r.t. functionality and awesome GUI to work with! But today’s article is based on the error that I faced while updating the solution.

IMP NOTE:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Here is the error message:
Cannot uninstall Language Pack 0 because it is not deployed when attempting to uninstall-spsolution

One thing we always need to understand is the logic would be same for the functionality irrespective of which SharePoint version you are working!

I have written one article in the past for SP2010 based on the same concept: http://sharepointknowledgebase.blogspot.com/2013/11/solution-deployment-stuck-on-deploying.html and today I am going to elaborate more on the same theory as I have resolved the above mentioned error message with the same funda.

What’s that funda? – Here we go:
If you are facing this error message then I would suggest checking the status of your solution in central administration. How to check this? Here are the details:
o   Central Administration
o   System Settings
o   Manage Farm Solutions
o   It will open the solution management
o   Here you can check the status of your solution

If your solution is showing updating, deploying or retracting status then first and top most check that you need to verify the status of your TIMER JOB across all WFE’s.  How to check this? – Here are the details:
o   Login to your web front end (WFE)
o   Start
o   Run
o   Type “services.msc” and hit enter
o   It will open the services console
o   Click on any service and press S
o   It will directly show you the SharePoint Services
o   Second service will be SharePoint Timer Service
o   Check the status across all your servers

Two outcomes will be there:
1.   Timer service will be stopped one of the server:
If this is the case then start the timer job on that specific server and check the results by executing the commands that you are using.

2.   Timer service is started on all the servers:
If this is the case then restart all the SharePoint Timer Services across all servers. Once this done then execute the commands that you are doing and check the results

If you are looking out command reference then please refer this link in which I have given the reference of add solution as well as update solution:

Details notes:
Add-SPSolution
Add-SPSolution -LiteralPath c:\nameofyoursolution.wsp

Install-SPSolution
Install-SPSolution -Identity nameofyoursolution.wsp –GACDeployment

Uninstall-SPSolution
Uninstall-SPSolution -Identity nameofyoursolution.wsp

Remove-SPSolution
Remove-SPSolution -Identity nameofyoursolution.wsp

Update-SPSolution
Update-SPSolution -Identity nameofyoursolution.wsp -LiteralPath c:\nameofyoursolution.wsp -GACDeployment

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.

Product Applies To:
o   SharePoint 2013
o   SharePoint 2010
o   SharePoint 2007

13 April, 2014

No Save Site As Template SharePoint 2013

‘Save site as template’ is a pretty useful feature which has been carried out from SharePoint 2007 version and it’s still there in SharePoint 2013. Useful functionality when we want to transfer the site structure from one location to another with small data as it has a size limitation. I don’t want to discuss about size limitation in this article as it altogether a different issue and needs a separate set of troubleshooting.

In the past, I have written some useful articles to share the knowledge based on the same topic. Please find the following references:

Mystery of save site as template in SharePoint 2010

Save site as template using SharePoint Designer 2010

Save site as template is missing

How to activate the site template in the solution gallery

Unexpected error has occurred while saving the site as template

IMP NOTE:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Problem description:
One user has reported an incident that he is not able to save the site as template. – That’s a plain description. Previously I thought that he might be facing some problem/error while saving the site as template but further probing revealed the fact that he is not able to see the option “save site as template”.

Error message:
There is no error message here as the link is missing so NA.

Let me tell you some facts which are useful to understand the logic behind this-
It’s been pretty clear that if you have the publishing feature activated on your site collection then ‘save site as template’ won’t be there.

Reference:
SharePoint Publishing feature does not support "Save Site as Template" option

But there is a tweak here for SharePoint 2007 and SharePoint 2010 versions as people can get this functionality / access that page by appending http://sitename/_layouts/savetmpl.aspx !

But this is a closed loop in SharePoint 2013 as you cannot browse that page by making the changes in the URL.

But after when I realized that it’s not possible using GUI so i started exploring SharePoint Designer 2013 and found the solution.

Resolution / Here are the complete details:
1.   Open the SharePoint Designer 2013
2.   Top Ribbon
3.   You will see the ‘site options’
4.   Click on it
5.   You will see 4 different tabs (Parameters, language, advanced and navigation)
6.   Click on parameters tab and you will see the option of “SaveSiteAsTemplateEnabled” is set to False
7.   Select the option ->click on Modify
8.   Set it true
9.   Click on Apply and OK

Please refer the following screenshot for better clarity.



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.

Product Applies To:
o   SharePoint 2013

08 April, 2014

Web Applications using Claims authentication require an update

Recently we have created a web application using claims authentication and after few days, we have noticed an error in the health analyzer as mentioned below:

ERROR MESSAGE: Web Applications using Claims authentication require an update.



You don't need to research on this error as there is an official documentation has already been published by Microsoft. – Thank you MS.

Here is the link:

To download the update, go to

Additional notes:
1.   Download the Windows6.1-KB979917-x64.msu (Win7) update (for Windows Server 2008 R2).
2.   Copy the setup to all your SharePoint servers -> Install it one by one.
3.   Once the install is finished then please restart all the servers.
4.   Once all the servers are up and running
5.   Click 'Reanalyze Now by means of health analyzer list
6.   The error shouldn't be there in the list!

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.

IMP NOTE:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

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

12 May, 2013

Deletion of Subsite, Site Collection, Document Library, SharePoint List- SharePoint 2010

Most commonly used entities in SharePoint are Subsite, site collection, list and libraries. 

GUI mode will be the easiest mode to do any functional activities associated with them. In this article, i am more concentrating on the PowerShell mode because its very easy and efficient way to clean the activity directly from the database. 

Let's try to explore some deletion functionalities by means of PowerShell.

How to delete a site collection by using PowerShell?
Remove-SPSite [-Identity] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-DeleteADAccounts <SwitchParameter>] [-GradualDelete <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Example: Remove-SPSite -Identity http://SharePoint2010/sites/test2010

Where:
SharePoint2010: web application URL.
Sites: wildcard entry.
test2010: site collection that you want to delete.

Note: The above will completely deletes an existing site collection and all subsites. This operation cannot be undone.

How to delete a Subsite by using PowerShell?
Remove-SPWeb [-Identity] <SPWebPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Recycle <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Example: Remove-SPWeb -Identity http://SharePoint2010/sites/test2010/subtest2010

Where:
SharePoint2010: web application URL.
Sites: wildcard entry.
test2010: site collection
subtest2010: Subsite that you want to delete.

If you want to delete multiple subsites in a single shot from a site collection then please refer the following site: http://get-spscripts.com/2010/10/delete-sharepoint-sub-sites-using.html

How to delete a Document Library by using PowerShell?
Please refer the following code by which you can delete a document library without any issues...

$web = Get-SPWeb urlofweb
$library = $web.lists["listname"]
$library.Delete()

How to delete a SharePoint List by using PowerShell?
Get-SPWeb “site collection link” | % {$_.Lists.Delete([System.Guid]$_.Lists["name of list"].ID)}

The above command will delete the mentioned list without any issues...

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

03 May, 2013

Redirect a SharePoint site by using the Content Editor Web Part - SP2010

Today one user came up with the requirements that he wanted to redirect his current site to different site collection. This seems to a normal requirement for everybody and can arise at any time.

I have resolved that issue with the use of metatag and thought to share with all of you as how I resolved it.

Please refer the following the following line of code that you need to use it for the redirection purpose.

<meta http-equiv="refresh" content="2;URL=http://sharepoint2007/sites/contentmodification">




Where you need to use it?
-Open the site where you need to set up the redirection
-site actions
-edit page
-add the content editor WebPart
-Give the reference of this file.

You must be wondering what is meant by reference?
-Created any document library or use the existing one
-Copy the redirection script/line in a notepad
-Upload this notepad in a document library
-click on the notepad direct and copy the link from the browser.
-Go back to the site where you have added the content editor WebPart
-Enter the link inside the WebPart which will take the reference of that notepad.

That’s it. You are done with redirection.

If you have any queries/questions based on the same then please let me know, Thank you.

26 April, 2013

not able to activate the feature in SharePoint 2010

Problem Description: not able to activate the feature in SharePoint 2010

I was facing the following error messages while activating the feature at the site level.

Where exactly:
-Site actions
-Site settings
-Manage site features

Error Message:
Site
The feature being activated is a Site scoped feature which has a dependency on a Site Collection scoped feature which has not been activated. Please activate the following feature before trying again: SharePoint Server Publishing Infrastructure f6924d36-2fa8-4f0b-b16d-06b7250180fa

Web
The Site scoped feature being activated has a dependency on hidden Site scoped feature 'FeatureDefinition/22a9ef51-737b-4ff2-9346-694633fe4416' (ID: '22a9ef51-737b-4ff2-9346-694633fe4416'). Hidden features cannot be auto-activated across scopes. There may be one or more visible Site scoped features that auto-activate the dependent hidden feature.

From the above error message, it is quite clear regarding the resolution we need to apply to get rid of this message.

Resolution:
Let me explain in details, step by step:
-Open the site on which you are facing this problem
-site actions
-site settings
-site collection administration
-site collection features
-activate the appropriate feature as per your requirements.

Note: if you are not able to see the ‘site collection administration then you don’t have appropriate rights to activate that feature.

What you need to do in such situations? - Please contact your site collection administrators and mention the complete details so that they can activate the feature for you / tell them to assign you site collection admin rights -(this is sometimes difficult if they follow the policy)

Product Applies to:
-SharePoint Server 2010
-SharePoint Foundation 2010

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.

18 April, 2013

Online interview SharePoint professional – 4 pragmatic questions I asked

Finding and getting right people to work for your company isn’t as easy as you think even you find many awesome things in resumes. To SharePoint field, the difficulty of recruitment becomes more true because of complexity of SharePoint platform and different uses of it. Have you ever been responsible for interviewing SharePoint professional working for your company? Which questions would you like to ask your candidates?

Recently, I’ve been assigned to be part of recruiting team in my company, responsible for online interviewing some candidates whose good-looking resumes on my table. I, although, did quick search on Google using keyword “SharePoint Job interview questions” but I never used any of them to ask the candidates. I didn’t ask something like “What is the X method?” or “Is there any difference between X and Y?” or “How does execution of X code impact on Y environment?” because I did know someone could readily put his fingers on the Google search box and then quickly found good results. So what did I ask when doing an online interview? In this post, I would like to share only 4 pragmatic questions I asked for SharePoint Solution Director candidates.

Can you tell me about two most favorite projects you have worked on?

A brilliant candidate should get started with brief introduction, his role and responsibilities, project size and duration. Through his answer, you probably know he has hands-on experience, especially his passion on those projects. Candidates can’t find the answer to my question on Google or another search engine.

Let’s see a sample answer: “One of the most favorite projects done was to build a logistic management application built on top of SharePoint platform. I worked as Lead Architect, responsible for planning and designing architecture covering infrastructure, capacity, storage, security and development. We had 6 team members working within 4 months to complete the project.”
After getting such a clear answer, you can possibly have a few extra questions such as:
  • Can you concisely describe features of the logistic management you completed developing? Using this question, you can figure out how complex this project is.
  • How many roles in this project? Which was the most important role you think? I know this question should be focused for SharePoint project manager but if he actually has good mindset, he should probably get to overall picture of the project.
  • Can you describe a little bit of the environment? You may get an overview of SharePoint farm maybe with a staging farm. It looks really cool, isn’t it?
Which challenges/issues did you get in the two projects?

A real experienced SharePoint professional has to note challenges and issues or at least remember during his project. The reason I ask is to know how he solves problem if occurred, and more details in solution architecture and probably soft-skill he has. Sometimes you expect to see soft-skill a candidate has rather than technical skill used to solve complexity of SharePoint project. That said, when asking an Indian candidate, I was expecting to get more of X management challenge such as risk management, change management or so on. However, he mostly focused on answering code stuffs, e.g, “They didn’t have the latest code available for the custom code solutions deployed in SharePoint 2007”, or “We had to update the existing code and then build it on x64 platform before upgrading to SharePoint 2010.” At this point, you can see this guy can fit developer role rather.
I know code related issue is one of the most common challenges in SharePoint project but I need to know if there is something else that keeps me asking in more details because of my curiousness.

Let’s see a sample answer: “Although we used Microsoft Solution Framework to manage SharePoint project, we still had problem with customer requirement that were changes of functionality. We had to deal with that, and built a SharePoint site collection used to track changes and manage the problem. Another issue was that we didn’t have a Team Foundation Server professional so our collaboration process got some times delayed.“

The Indian guy I interviewed worked with a customer that had SAP system and they wanted to pull data from it to push to SharePoint. He had to write a custom web service. I know he is really good at customization but what I was expecting to see from his answer should be like: “The customer had SAP system and they wanted to pull data from it and then push to SharePoint. We knew that Duet enterprise was an epic but the customer didn’t have enough budget so we had to customize web service to meet the business requirement and fit the budget.” Duet Enterprise was my focused point that would denote his breadth knowledge.

What are different/same things between any two projects you have done?

I don’t need candidates to elaborate differences, or list all different/same things. What I expect is to see if candidates have good brain to remember what they have done, and how they response in systematic way, and their brain be organized logically.

Let’s see a sample answer:  “We had two SharePoint document management projects (A and B) but A had document processing workflow but B didn’t. Conversely, B required digital signature issued by a PKI (Public-key Infrastructure) but A didn’t. One of the same things were the functionality of search based managed metadata.”

What do you think about the concept of SharePoint Out-of-the-box (OOTB)?

There are many .NET geeks turned SharePoint developers often do many customization on SharePoint-based application because they think they can do everything on such a platform built .NET framework. I really expect to see how much candidates are familiar with SharePoint OOTB in order to reduce effort of customization. There are many business solutions that can be done very quickly by using OOTB but folks often go with really hard ways. Workflow that has multiple approval processes is an example. Building dashboard by Dashboard Designer and PerformancePoint without writing code is another one. I’m not talking about complex dashboard. By the way, I strongly recommend reading “Microsoft SharePoint 2010 – Creating and Implementing Real-World Projects” book and “Professional Workflow in SharePoint 2010 Real World Business Workflow Solutions” and “Beginning SharePoint 2010: Building Business Solutions with SharePoint“. The books cover real-world no-code business solutions.

When having a blueprint in your hand, take a glance at SharePoint OOTB to see if it can meet business needs without code, or write a little code putting in Content Query web part to trigger something, for example.  At this point, you can supposedly bring out a scenario, e.g., ABC is the marketing company that helps customer in promotion of products and services by organizing conference. Each conference has its own a set of documents that likely consists of marketing plan, budget plan, program plan and other documents related to the conference. ABC is using SharePoint and wonder if it can help manage such a set effectively. As an experienced SharePoint professional, what would you like to suggest them? I’m guessing many of you immediately propose Document Set feature that actually addresses to the concern. Ironically, you might forget asking which SharePoint version the marketing company is using, right?

Conclusion

In my opinion, these questions do qualify someone who indeed has much experience on SharePoint platform and he has done many real-world SharePoint projects whether those are big or not. These questions are connected logically so if you don’t really have much SharePoint experience, you could get stuck at any of the questions. Besides, candidates can’t find good answers from Google or even they refer to friends of theirs.
When you do an online interview, try to avoid your candidates doing search by asking intelligent questions. You shouldn’t ask kind of “How-To” question or technique focused. Having good technical skills is really good these days but it’s not enough for working in the harsh world.

Thuan Nguyen - SharePoint MVP

17 April, 2013

Migrate managed metadata from one environment to another in SharePoint 2010

What will be the requirement?
Your user will be raising a ticket for to create a replica of the production site in development environment.

Quite easy - correct? You can easily implement this by using PowerShell but now the problem starts from here. If your site collection admin has created a term store in production site then you will not get those in development environment. Hmm- seems to be difficult now, isn’t it?

Reason: Managed metadata terms and term sets each have a unique guid and the guids don't match up

Nothing to worry about as we have a solution for that :)

Let me brief some details as local terms can be created by 2 ways:
-centrally i.e. @Central Administration Level
-Locally i.e. @site collection level

Let me talk about ‘Centrally’ first: There are some ways by which you can implement this.
-By using Export and Import
-By using Database method

Let’s discuss about the first method i.e. Export and Import

Export Example:
$mmsAppId= "e1c96163-7767-4497-8e92-51eb154f0c70"
$mmsproxy = Get-SPServiceApplicationProxy -Identity "4d4b3094-a9ad-4cee-99f4-392d489a1657"
Export-SPMetadataWebServicePartitionData -Identity $mmsAppId -ServiceProxy $mmsproxy -Path "E:\backups\SP2010_Backups\mms.bak"
You must be wondering as how to get this App ID Guid Placeholder and Proxy ID Guid Placeholder. It’s very easy-please refer the following steps:
How to get App ID Guid:
-Central Administration
-Application Management
-Manage Service Applications
-Managed Metadata Service Application
-refer the browser now and copy the guid which is after tsid=

How to get Proxy ID Guid:
-Open the PowerShell console
-execute this command-  Get-SPServiceApplicationProxy
-You will see a list of proxy id’s and you need to copy ID that belongs to managed metadata.

Follow the same process in Import also and get the guids. Obviously they will be different as they belongs to different farm i.e. target farm.
Import Example:
$mmsAppId= "d7b7b20c-aed1-4cag-ba6a-45baa9d6adf2"
$mmsproxy = Get-SPServiceApplicationProxy -Identity "df8606f1-cfca-4283-89db-9270e0a5adec"
Import-SPMetadataWebServicePartitionData -Identity $mmsAppId -ServiceProxy $mmsproxy -Path "\\SP2010_SQL\SP2010\mms.bak" –OverwriteExisting
Database approach:
-Backup the managed metadata database in your source farm
-Delete the MMS service in your target farm
-Restore the managed metadata database to your target farm
-Create a new MMS service in your target farm
-Ensure correct service accounts have full control of MMS

How to move local term stores?
We can easily move the local term stores by using the following tool:
Documentation is already provided on the above site only so I will not go much deeper in reference to this tool but it’s very easy and user friendly too.
If you have any queries/questions regarding the above mentioned information then please let me know, thank you.