Friday, August 1, 2008

STSADM Restore Error - Version does not match

Another thig you learn the hard way -

When you are using STSADM -o export
You should use STSADM -o import

So far so good... buy when the time in the night gets late - and you try to use STSADM -o restore... that can take a while to figure out :)

So - wierd thing is you will get an error saying the backup is from a newer SharePoint version and you need to update your installation... Naturally - I wasted a good hour making sure I have latest version intalled.

Goggle did not help on this one... Finally I noticed I am using the wrong command - So if you googled this in the same situation - make sure you are using the correct command!

Backup - Restore
Export - Import

:)

Good luck!

Thursday, July 31, 2008

SharePoint Configuration Wizard Fail

Hey,

Just installed a KB from microsoft on my SharePoint server and when I tried to run the configuration wizard afterwards I got a strange error message:
Could not start service SPSearch

Naturally, I went to have a look in "services" and I found that the "windows sharepoint services search" service was stopped, and could not start...

Starting it says it cannot login due to wrong username / password... strange...
I updated the correct password - started it - OK,

So - back to the wizard... running the wizard - same error message - checking the service - login failed...
strange...

After 4 or 5 times my stuck trace overflowed I guess, so I started thinking... why would the wizard change my service user name / passwor?

Than it came to me: I updated the SP admin user password a while back, and thought I updated it every where. Even used some stsadm -o upgradefarmcredentials and other credential updates...

But - than I came accross this command:
stsadm -o spsearch -farmserviceaccount domain\spadminuseraccount -farmservicepassword xxxxx

After runnign this command the wizard completed successfully.

I must say that the only reason I knew it had anything to do with the SPSearch is by watching every step of the wizard. The after-crash log file they propose is useless!!!

Well, when failing the wizard - here is another thing to keep in mind!

How to add Source parameter to SharePoint links automatically?

Hi,

You know when you click a link to view item in SharePoint list and when you click Close it goes back to the page you came from?
Or when you edit an item - clicking OK returns you the page you original came from?

Well, you may have noticed SharePoint does that by adding the "Source=" url query string parameter to the address, and uses it to knwo where to go after we user is done.

So, basically - you can use that to redirect the user anywhere you want after he finishes with the form you sent him to, but - what if you want it to automatically be set to the current page's address?
Of course you can hard code the page's address, but what about additional query string parameters, of multiple addresses to the same page (different host headers)?

There is an easier way - the way SharePoint adds the "Source" parameter -
simply add this bit to your a link in HTML:
ONCLICK="GoToLink(this);return false;"

so that your link will look like:
<a href="/Docs/Lists/Announcements/DispForm.aspx?ID=1" ONCLICK="GoToLink(this);return false;">view item</a>

The GoToLink will automatically add thye current page's address before navigating to the HREF you entered!

Shai Petel