Category Archives: Uncategorized

Designer Workflow 2010: Unable to load workflow actions from the server. Please contact your server administrator

I needed to make some modifications to one of my sites with custom SharePoint designer workflows. I open SharePoint Designer, click Workflows, click my workflow and I get Message box that

Unable to load workflow actions from the server

Investigation of the error – steps:

  1. Turn on Failed Request Tracing on IIS – this did not show any more specific error, only 500 Internal Server Error on SharePoint web service call
  2. Checking ULS, nothing logged there
  3. Created empty site collection with Publishing feature and workflow – workflows open correctly
  4. Same site restored to another server – workflows open correctly
  5. I do not have any custom developed Workflow actions!
  6. I compared farm solution on one server and another server. I see some differences in solutions. I think, can have something to do with installed solutions. There is one suspicious looking solution there that we once tried to use to move site with workflows and forms from one farm to another (by saving site as WSP package). It is installed globally. I know we abandoned idea as it fad site backup/restore instead. I retract this solution. I go back to designer and find workflow working.

So, conclusion:

Checking custom solutions is another checkpoint in investigation of this nasty error. I have read tones of msdn threads on this one, and causes can be different, but Designer will always give you same error message. My solution was generated from saving site as template (WSP package). It was site with custom workflows and some infopath forms deployed to this site as content type.

Help, My events are not firing – ASP.NET

My dear friend co-worker authorized my blog to post his valuable finding of today. His own blog link shall not be mentioned as it is ‘work in progress’ and still too ugly and has no dog photos 😉 I will  definitely link it when it is ready, promising good stuff around custom asp.net dev and our favorite SharePoint dev.

Scenario:

You have a website http://site with default document http://site/default.aspx

In default.aspx, you have a button with event handler:

<asp:Button ID=”btnAddNote” Text=”Add Note” runat=”server” OnClick=”OnButtonClick” />

protected void OnButtonClick(object sender, EventArgs args){// some interesting code}

1)      You go to http://site/default.aspx and click button. It works fine!

2)      You go to http://site and click button. Page posts back but NOTHING HAPPENS. No event is fired. You debug, put breakpoint there, but it is never hit.

Conditions:

  • You are running IIS 7.0 or 7.5
  • You are running .NET 4.0
  • You have some httpmodules added in your web.config

Then you may be a victim of a breaking ASP.NET 4.0 change:

http://www.asp.net/whitepapers/aspnet4/breaking-changes#0.1__Toc256770154

Quick solution:

In your code behind, on Page_Load, put:

this.Form.Action = “Default.aspx”;

Content Query webpart error after migration to SharePoint 2010

I had one webpart that displayed error after site migration to SharePoint 2010:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

Correlation ID:

I checked webpart properties and noticed:

  • Query was configured to take one list
  • There was grouping applied – grouped by Site

SharePoint 2007 was working fine even grouping was quite silly as all elements were coming from one site only, due to query scope.

In order to fix this problem, you need to change scope of the query to ‘site collection’ or ‘subsite’ and then filter content type or list template. Then option to group by site will be available again. If you scope it to lsit or library, ‘site’ is not available to choose.

SharePoint 2007 2010 migration – cannot activate Publishing Infrastructure – column limit exceeded

You migrated your SharePoint 2007 site to SharePoint 2010 using database attach.

Your site was publishing but after migration, you notice that Publishing Infrastructure site collection feature is not activated.

You try to activate and you get:

Column Limit Exceeded.

There are too many columns of the specified data type. Please delete some other columns first. Note that some column types like numbers and currency use the same data type.

I found this post helpful to solve this issue

http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/2610f129-8e00-4e31-987b-b62efc228c3f

After deleting fields from Quick Deploy Items I get another error when activating:

Failed to create “Reusable Content” library. Original exception: Column ‘ShowInRibbon’ does not exist. It may have been deleted by another user.

Ok, tricky,  in some msdn posts suggest to delete Reusable Content list, which obviously exists on the site. In my case, I cannot delete it as it contains lots of reusable content.

So I tried be smart and I just have created column “ShowInRibbon”.

After that – Activation succeeded!

I am not sure if this is the end of adventures with this particular site, I am still missing few things, such as “Create page” in site Actions… Wish me luck 🙂

 

 

The parent content type specified by content type identifier 0x0101 …

Deploying custom content types for SharePoint 2010 can be quite painful, especially when you are migrating project from SharePoint 2007.

There are few things to add in ContentType elements file, but lots of guys are already mentioning it – Version=”0″ and Inherits=”TRUE” properties need to be added to your XML to make content types come up after feature activation in SharePoint 2010. Sometimes even Overwrite=”TRUE” but honestly I do not understand what this one does and how to use it properly…

But sometimes you still get funky errors and your feature cannot be activated. Usually it errors on feature activation. There are many alternate errors coming such as:

“The parent content type specified by content type identifier 0x0101 …”

“Key cannot be null”

The biggest issue is – there is no sense and no logic in errors that coming. Sometimes there are different errors when you deploy through Visual Studio than when you activate in Powershell. You can spent all day deploying/reactivating and you do not comprehend what the problem is because inconsistency in errors coming up.

Some points to keep in mind:

  • Be extremely careful with multiple content type xml files. It is better to use one schema file that will contain all fields and then all content types. Visual Studio controls the order of elements, if it puts content type before fields – activation will fail. If it puts child content type first before parent content type – activation will fail
  • Even in one xml file – you still have to be very very careful. I noticed that sometimes, if you have child and parent content type – it is good to place parent content type, then some other content types, and then child content type. If they one after another, it can happen that SharePoint fill give you error “Parent content type not found”
  • Every <ContentType> element has to have <FieldRefs /> node, even if no fields are added
  • Be careful with <FieldRef> element, finish it with /> and not witl ></FieldRef>
  • If you have syntax error in your file, it may result in disappearing of all content types (even out of the box) from Site Content Type list. Don’t panic, when you retract solution they will be back. You just have something nasty in your elements file that corrupts site content types schema

SharePoint 2010 Your page layouts not available when trying to change it for the page

Scenario:

You are creating your custom page layouts for welcome page, you are deploying it to your site as sandbox solution.

You go to your site that happen to be based on Enterprise Wiki template, edit page, go to “Page layout” you have only 3 options there :

First step to resolve this is to go to Site actions >Site settings > Page layouts and site templates and to add your layouts to available page layouts . (http://site/_Layouts/AreaTemplateSettings.aspx)To be sure, just tick “all layouts”. Click Ok and go back to your page, try to edit it and change page layouts.

Ups, still not there??? Your layouts are still missing?

You go to Page layouts and site templates again and confirm you have done everything correct.

Your may have missed one important step -checking in your page layouts in masterpage gallery. This will happen if you deploy your layouts via sandbox solution – they all checked out and draft.

Check them in and go to page again. Success!!! They can be now chosen for your page