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

Unhandled exception was thrown by the sandboxed code wrapper’s Execute method in the partial trust app domain: An unexpected error has occurred.

Let’s start from beginning:

  1. You build sandbox solution that consist of branding feature will provision masterpages to masterpage gallery and styles to style library. Easy
  2. You are deploying solution to the site. You activating solution, all fine, branding feature has been activated automatically.
  3. Some time later you are upgrading a solution because you fixed few issues.
  4. You are deactivating solution, uploading solution, then you click activate. You get: Exception from HRESULT: 0x81070966
  5. Solution seems to be activated even you got this nasty error.
  6. You go to site collection features and you realize that your branding feature is not activated.
  7. You try to activate it and you get: Unhandled exception was thrown by the sandboxed code wrapper’s Execute method in the partial trust app domain: An unexpected error has occurred.
  8. No errors in trace log

When this happens to you, check if your masterpage has not been checked out by someone else. That was true in my case, someone else was provisioning this package and because sandbox files are always checked out to the person deploying it, if one does not remember to publish them manually of through the script, you can get this nasty error.

 

 

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

Enabling permalinks on Apache server to use on WordPress

I am having a go with WordPress engine and customizing blog themes (thinking I am SharePoint guru god damn, I can do this silly stuff no worries!)┬á I was particularly interested with Portfolio Theme that allows you to display gallery-like style portfolio items. I ran into the issue that I want to describe here as I did not find any straightforward and quick answer on the web. I must admit at the very beginning that this is my first day playing with WAMP/Apache/Wordpress/php so everything is new and strange to me. Maybe I am not good at using google without keywording for SharePoint, maybe my problem was too dump for┬á finding quick answer, I don’t know… I am still puzzled that I did not find solution from first result returned from search.

Symptom:

I am following http://wptheming.com/2010/07/portfolio-theme/ video describing how to set theme up. One step there is to rewrite permalinks which means URLs will have nice form of: http://site/page-name and not http://site/?pageid=N. Ok, easy.

But when I completed this step, my pages were not accessible anymore with 404 error. Now, there is some info on this page:

404 Errors:

This theme uses custom post types. If you are getting a 404 error when you try and view the portfolio posts, reset your permalinks. You can do this by going to ÔÇťSettings > PermalinksÔÇŁ and re-saving the permalink structure.

So I did it a few times, it did not help, I googled for solution, no luck but people were reporting this problem as well. Solutions involved some hard-coding php, in files that I even could not locate… I started getting flustrated, I decided to get back to basics, googling for enabling permalinks on Apache. This is how I figured out that my brand new Apache server have module installed but not enabled by default. So I found Apache config file called httpd.config and I noticed that this line is commented out.

LoadModule rewrite_module modules/mod_rewrite.so

I uncommented it and tested if my pages work. Nope. I found that you also need to change this line from:

AllowOverride None

To:

AllowOverride All

I restarted Apache server (I googled how to do it as well, in my case I closed WAMP and reopened it, WAMP is just like a user-friendly interface to manage Apache, PHP and MySQL, where “user-friendly” should be definitely in “” :-))

After these steps, miracle, my WordPress pages work ­čÖé

From now on, I promise, I will not wing on SharePoint anymore…

Trivia Night – czyli w jaki spos├│b Australijczycy wspieraj─ů przyjaci├│┼é

Wczoraj mia┼éam mo┼╝liwo┼Ť─ç uczestniczy─ç w chyba dosy─ç typowym tutejszym przedsi─Öwzieciu, jakim jest tzn. wiecz├│r charytatywny na wsparcie konkretnego celu. Tym celem by┼éa pomoc finansowa dla siostry kolegi, kt├│ra zosta┼éa wytypowana do narodowej dru┼╝yny krikieta halowego i za miesi─ůc leci na mecz do RPA. Koszty nie s─ů pokrywane w ca┼éo┼Ťci przez pa┼ästwo, tak wi─Öc przedsi─Öbiorczy znajomi i rodzina postanowili zatroszczy─ç si─Ö o dodatkowe fundusze w ten oto spos├│b, zapraszaj─ůc oko┼éo 70 os├│b do rywalizacji w quizach i dodatkowych zabawach.

Nagrody dla zwyci─Özc├│w zosta┼éy wyproszone w lokalnych sklepach i innych biznesach (np. by┼éy koszyki z kosmetykami Avonu, vouchery na si┼ék─Ö, wina, damskie portfele). Wygl─ůda na to, ┼╝e nie trudno o takie wsparcie ze strony lokalnych przedsi─Öbiorc├│w, nazwy firm zosta┼éy wspomniane w podzi─Ökowaniach. Opr├│cz zagadek ca┼éo┼Ť─ç sprzeda┼╝y piwa, napoj├│w i oczywi┼Ťcie obecnych kanapek z grillowan─ů kie┼ébask─ů (sausage rolls) sz┼éa do worka dla Keisy. Je┼Ťli kto┼Ť zosta┼é z┼éapany na googlaniu odpowiedzi na iPhonie – 5 dolc├│w kary dla Keisy, podpowied┼║ do zagadki – 3 dolary. By┼éy te┼╝ losowania nagr├│d dodatkowych (tzw. raffle – czyli kupuje si─Ö bileciki z numerkami, kt├│re s─ů potem losowane, im wi─Öcej kupisz bilecik├│w tym masz wi─Öcej szans).

Przebojem wieczoru okaza┼éa si─Ö zabawa w rzucanie monet (zasada – musz─ů by─ç to monety z┼éote, czyli 1 lub 2 dolary). Ustawia si─Ö whisky i wszyscy pr├│buj─ů rzuci─ç i umiejscowi─ç swoj─ů monet─Ö jak najbli┼╝ej butelki, wszystkie monety kt├│re s─ů dalej, trafiaj─ů do worka dla Keisy. Zabawa mo┼╝e trwa─ç ca┼é─ů noc, nowi gracze dochodz─ů do rywalizacji licz─ůc na szybkie zwyci─Östwo i whisky za dolara – nie ma jednak tak ┼éatwo, bo ka┼╝dy liczy na to samo i pokonuje si─Ö nawzajem w spektakularnych i g┼éo┼Ťno oklaskiwanych rzutach. Po kilku pr├│bach oczywi┼Ťcie emocje i ┼╝─ůdza zwyci─Östwa bierze g├│r─Ö i rozmieniane s─ů kolejne banknoty. Monet w worku nie brakuje, banknot├│w przybywa.

W ten oto spos├│b pospolita butelka whisky za 30 dolc├│w w monopolowym zarabia na siebie jakie┼Ť 300 dolar├│w, a ostatni szcz─Ö┼Ťliwiec odchodzi w glorze i chwale, rozradowany jak osio┼é do siana. Rewelacja!!! Tak niewiele potrzeba aby rozbudzi─ç ducha pomagania sobie. Najwa┼╝niejsze, ┼╝eby nie by┼éo nudno ani rzewnie, ┼╝adnego moralnego przymusu czy natarczywego epatowania potrzeb─ů wsparcia. Wystarczy zaspokoi─ç ducha zdrowej rywalizacji i interesowno┼Ťci. Przecie┼╝ te nagrody nie by┼éy jakie┼Ť niesamowite, nie by┼éo iPada, konsoli do gier czy deskorolek, liczy si─Ö nawet niewielki drobiazg.

Musz─Ö przyzna─ç, ┼╝e w tym gronie w wi─Ökszo┼Ťci obcych mi ludzi, w hali publicznego o┼Ťrodka sportowego w jednej z najgorszych dzielnic Sydney, i mi udzieli┼é si─Ö przyjemny duch lokalnej spo┼éeczno┼Ťci. ┼Ťwiadomo┼Ť─ç,┬á ┼╝e ludzie wok├│┼é nas nie s─ů tylko po to, ┼╝eby dok┼éada─ç do ┼Ťcisku i zaduchu w poci─ůgu, do zakorkowanych ulic i globalnego ocieplenia. Ludzie s─ů sobie nawzajem potrzebni a posiadanie takich przyjaci├│┼é to rzecz o kt├│r─ů warto zabiega─ç.

Oddzia┼é chorych na raka – Aleksander So┼é┼╝enicyn – recenzja z niedoczytanej pozycji

Oddzial-chorych-na-raka_Aleksander-SolzenicynD┼éugo nie pisa┼éam z uwagi na urlop, a na urlopie czyta┼éam tylko jedn─ů ksi─ů┼╝k─Ö i jej niestety nie sko┼äczy┼éam. I tak ju┼╝ chyba zostanie, gdy┼╝ wymieniona pozycja nie polecia┼éa ze mn─ů z powrotem na koniec ┼Ťwiata. A szkoda, jestem troch─Ö ciekawa los├│w pacjent├│w oddzia┼éu chorych na raka. Mam nadziej─Ö, ┼╝e wyzdrowieli i wyszli ze szpitala chocia┼╝ ton powie┼Ťci tego raczej nie zapowiada.

Wszyscy podkre┼Ťlaj─ů, ┼╝e surowy szpital So┼é┼╝enicyna to alegoria pa┼ästwa totalitarnego, dla mnie jednak wa┼╝niejsza by┼éa ta dos┼éowna wymowa – opis plac├│wki lecz─ůcej raka, jej pacjent├│w, piel─Ögniarek i lekarzy, nakre┼Ťlony z przera┼║liwie rzeczow─ů dok┼éadno┼Ťci─ů, bardzo wiarygodny, oddaj─ůcy nie tylko medyczn─ů, naukow─ů i zawodow─ů stron─Ö, ale tak┼╝e ludzkie uczucia, l─Öki, przemiany pod wp┼éywem terminalnej choroby. Wkrad┼éa si─Ö te┼╝ odrobina romansu, delikatnego i troch─Ö rzewnego.

Rak jest niew─ůtpliwie straszn─ů chorob─ů, kt├│ra poch┼éania nie tylko cia┼éo, ale i ducha cz┼éowieka, z┼╝era ludzkie marzenia, d─ů┼╝enia, zmienia priorytety, przewarto┼Ťciowuje idea┼éy. Zycie z rakiem to jak egzystencja na tykaj─ůcej bombie. So┼é┼╝enicyn sam jej do┼Ťwiadczy┼é, mo┼╝e dlatego jest wiarygodny, nie koloryzuje, nie pociesza, nie wyk┼éada mora┼é├│w. Chorzy bohaterowie powie┼Ťci s─ů tacy ludzcy, zwierz─Öco wyczuwaj─ů czyhaj─ůc─ů za zakr─Ötem ┼Ťmier─ç. Lekarze – bardzo znieczuleni, ale podsk├│rnie czuj─ůcy ka┼╝d─ů pora┼╝k─Ö, ci─ůgle walcz─ůcy o ka┼╝dego pacjenta, oszukuj─ůcy ich, aby nie pozbawia─ç ich nadziei.┬á Przepracowani, zm─Öczeni, ma si─Ö wra┼╝enie, ┼╝e sami s─ů chorzy od nadmiernego przebywania w tym gnie┼║dzie rozpaczy.

Warto przeczyta─ç, warto poczu─ç.

 

People picker not working – it does not find any users

We have noticed a weird behavior, it is very rare scenario we ran into, silly us, it was quite hard to figure out what was going on so I thought I will share it here ­čÖé

Scenario: We have test SharePoint 2010 farm, all configured and working, user profile synchronization working, profiles imported, we can apply security to users on portal site, we can pick them from people picker.

We go to User profil service application and we want to change Manager for one of the profiles. We type known existing user but people picker control does not resolve the user.

Another day, we did not have troubles with this operation:

What has changed, what broke???

As it come up, we were accessing Central admin site through wrong URL!!!

Lets assume we have Central admin site on address http://servername:port/ We have created another web application for portal site and assigned hostheader to it so we will be able to access portal as http://portalname. This is test environment, so for simplicity, we edited hosts file to map this “portalname” to localhost. Without thinking, we browsed Central admin site by url: http://portalname:port. Surprisingly, it works, you can access Administration. But people picker will not work.

Pod kopu┼é─ů – Stephen King

Pod kopu┼é─ů - Stephen KingNowa ksi─ů┼╝ka Stephena Kinga “Pod kopu┼é─ů” to moim zdaniem powr├│t do przyzwoitej formy i lekki powiew ┼Ťwie┼╝o┼Ťci w gatunku thriller. Jest tu wszystko, co jako fanka lubi─Ö w tw├│rczo┼Ťci tego autora:

  • S┼éodkie i trafne na┼Ťmiewanie si─Ö z g┼éupoty ludzkiej
  • Wulgarne i prosto z mostu dialogi
  • Czarne jak Smo┼éa ale wci─ů┼╝ wiarygodne charaktery
  • Dobre analizy zachowa┼ä ludzkich w trudnych sytuacjach

Pewnego dnia ma┼ée miasteczko oczywi┼Ťcie w stanie Maine zostaje drastycznie i dos┼éownie odci─Öte od ┼Ťwiata przez przezroczysta kopule. Wojsko pr├│buje ro┼╝nych metod pozbycia si─Ö niewidocznej bariery ale ┼╝adna nie przynosi skutku.

Ju┼╝ po kilku dniach od zdarzenia robi si─Ö niespotykanie jak na ta por─Ö roku ciep┼éo, zaczynaj─ů umiera─ç ro┼Ťliny, krowy nie daj─ů mleka a dzikie zwierz─Öta pope┼éniaj─ů co┼Ť w rodzaju samob├│jstwa. Nie lepiej dzieje si─Ö w ma┼éej spo┼éeczno┼Ťci miasteczka. Upiorny Jim Rennie widzi kryzys jako szanse zdobycia absolutnej w┼éadzy w mie┼Ťcie, jest nieobliczalny i niebezpieczny, zniszczy wszystko co stanie mu na drodze. Ma┼éy ob├│z mieszka┼äc├│w z by┼éym ┼╝o┼énierzem Iraku na czele pr├│buje si─Ö mu przeciwstawi─ç. Poleje si─Ö mn├│stwo krwi, a wszystko opisane z naturalistyczna dok┼éadno┼Ťci─ů i zimn─ů oboj─Ötno┼Ťci─ů narratora. Rewelacja !

Oczywi┼Ťcie mimo wart jej akcji wywo┼éanej zachowaniami ludzkimi najbardziej interesuj─ůca jest zagadka kopu┼éy. Ta jednak okazuje si─Ö troszk─Ö jakby niedopieszczona przez autora, tak jak i zako┼äczenie. Mimo to ksi─ů┼╝ka wystarczaj─ůcej ilo┼Ťci dobrze czytaj─ůcych si─Ö stron, aby g┼é├│d Kingowy zosta┼é obficie zaspokojony.

Powershell – change masterpage for your SharePoint site

This will work on both 2007 and 2010 version

 

 

$Host_URL = "http://portal"
$web = Get-SPWeb $Host_URL

if ($web.ServerRelativeUrl -eq "/")
{
$web.CustomMasterUrl =  "/_catalogs/masterpage/horsik.master"
$web.MasterUrl =  "/_catalogs/masterpage/horsik.master"
}
else
{
$web.CustomMasterUrl = $web.ServerRelativeUrl+ "/_catalogs/masterpage/horsik.master"
$web.MasterUrl = $web.ServerRelativeUrl+ "/_catalogs/masterpage/horsik.master"
}
$web.Update()