Tuesday, March 27, 2007

Can not save your changes error while editing the content editor webpart

After Editing the CEWP, clicking on the 'OK' , throws 'Can not save your changes' errror.

After looking at the error log, do the following options.

  • IIS Reset.
    If you think IISReset can cause the whole application to halut for some time, Do the Application Pool recycle.
    Start->Admin->IIS -> Local computer -> Application pool of the web application -> rightclick ->Recycle application pool.
  • Check for the SSL issues. To know whether the error is due to the SSL or not, access the site with the URL: http://LoadIPAddress/sites/sitecollection/site and try to edit the CEWP. If success, check for the IP address map in the IIS(richt click on the webappp -> Properties) and make it to 'Un Assigned'. Still not succeeded, check with the SSL settings.
  • Check the memory status of the DataBase SQL server. If it is less, increase the size.

Wednesday, March 21, 2007

Run stsadm command from any path

Every time you try to run the STSADM command, you always need to change the current command directory path to C:/ProgramFiles/.../12/Bin . To avoid that, do tha following thing. This will be helpful for the bulk shell scripts exetion wth the .

Control panel > System > Advanced system settings > Environment Variables >
Locate the “System Variables” section and select "Path" > Click edit.

Append the below string at the end of the line:
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\BIN

Thursday, March 15, 2007

list does not exist error on a publishing site

SiteCollection administrator/designers/approvers do not see this error.
Any normal user(including the full control/site owner gropu user) accessing any page in the site gets the error: The page you selected contains a list that does not exist. It may have been deleted by another user. Troubleshoot issues with Windows SharePoint Services.

Reason 1:
Here the list is not a normal list. It is the 'Masterpage gallery' list. This error is due to the fact that all the users/groups are not added to the 'Master Page Gallery' by default. This happened to me after activating the publishing feature to a collaboration site.

Fix 1:

  1. Go to the master page gallery associated with the site. http://sitename/sites/site/_layouts/sitemanager.aspx
  2. Click on the 'master page gallery' context menu -> Edit Properties -> Permissions for this document library -> add the group/user with contributor access. Read access also fine

Reason 2:

The page layout/master page is checked out or in approval state pending.

Fix 2:

Open the site in sharepoint designer and check-in/approve the masterpage/page lay out.

Saturday, March 10, 2007

DVWP issue with site template

Data View WebParts are binded with the site names implicitly. So when you create a site template out of the site that has the DVWP, there will be an issue. New sites provisioned from the site template will fail to load due to the reason that the site name is different.

Replace the code with the following. In the below code, replace the 'Your List name' value with your actual list name.

< SelectParameters>
<WebPartPages:DataFormParameter PropertyName="ParameterValues" ParameterKey="ListName" DefaultValue="Your List name" Name="ListName">

<DeleteParameters> <WebPartPages:DataFormParameter PropertyName="ParameterValues" ParameterKey="ListName" DefaultValue="Your List name" Name="ListName">

<UpdateParameters> <WebPartPages:DataFormParameter PropertyName="ParameterValues" ParameterKey="ListName" DefaultValue="Your List name" Name="ListName">

<InsertParameters> <WebPartPages:DataFormParameter PropertyName="ParameterValues" ParameterKey="ListName" DefaultValue="Your List name" Name="ListName">

<parameterbindings> <ParameterBinding Name="ListName" Location="None" DefaultValue="Your List name"/>

<ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>

<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>

<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>

Friday, March 9, 2007

Backup and Restore in MOSS 2007

Central Admin:
Central Administration -> Operations -> Perform a Backup

Backup a site collection:
stsadm –o backup –url -filename
Restore to a site collection:
stsadm –o restore –url -filename
you can not backup or resore a single site using above command.
Backup a single site
stsadm –o export –url -filename
Restore a single site
stsadm –o import –url filename
export/import may miss some functionality.. so double check.

Database backups:
This is probably the approach you will end up using most often. SharePoint stores all its data in SQL Server. Also, a site, or site collection, is nothing but data. Thus it is reasonable to assume that this data, can be easily backed up and restored using standard SQL Server mechanisms.
SharePoint stores its data in content databases. A single website can have a number of content databases, and a content database can contain one or more site collections. In other words, you cannot scope a content database to a single site or single list level.
You can view all the content databases associated with a given web application under central administration à Application Management à SharePoint Web Application Managementà Content Databases. This can be seen as below:

From this screen, you can add or remove content databases to a given web site. When you add a content database, you have the facility of specifying a database server and a content database name. If the database already exists on the server, it will be used as is. If in case the database does not exist on the server, it will be created for you by the farm account.
You can use this behavior to your advantage to backup restore web sites. In order to backup a web site, you simply backup all the content databases associated with the web application. In order to restore a website, you restore the content databases, and perform the extra step of specifying new site collection administrators in the new environment.
This is a fairly robust mechanism of backing up and restoring your SharePoint environment and I suspect that in any serious installation, this is what you will end up using the most anyway. This by far, however is not enough. Depending upon the specific needs of your SharePoint environment, also want to invest in the following:
Backup the entire 12 hive (c:\program files\common files\microsoft shared\web server extensions\12). This is because, frequently you will deploy code to your SharePoint farm, and you will need to restore the supporting physical files for the site to work properly.
You need to keep monitoring the size of your content databases. If you start hitting the 50GB mark, think of splitting them up, so the backups are done overnight before users start hitting the database in the morning.
Backup the entire INETPUB directory.
4. Always maintain a path to restore the current state of the production environment as various releases are pushed into production. This can be achieved by following the below recommendations:
a. Always use a scripted deployment process with clear instructions for deploying code to production. Give special attention to ensuring releases capable of taking your SharePoint installation from one version to another. With various releases, your scripts and instructions should be capable of taking a fresh SharePoint installation to the current production state.
b. Always deploy custom code as solutions, not fragile xcopy scripts.
c. Backup source control databases, and establish a strong version control policy for all code that goes into production.
d. Document all customizations and administration done under central administration for every release.
e. Follow standard disaster recovery best practices, such as regular and verified backups, off-site storage etc.
f. Backup Shared Service providers and Central Administration using stsadm after every significant configuration change or production release.
Backing up shared service providers
You can backup and restore an SSP in a mechanism similar to restoring any other SharePoint website. You must however perform the additional step of associating the SSP with the appropriate web applications after such a restore has been performed. This may be achieved using the following steps.
Under central administration, click on the “Shared Services Administration” on the left side of the page.
Once on the “Manage this farms shared services” page, click on “Restore SSP”.
Now assuming that you have already restored the SSP on a site, complete the required fields on the page shown. Just make sure that you specify the restored web application and database that the SSP site has already been restored to.
Backing up search
Search is probably the weirdest portion to backup on a SharePoint installation. First of all, given the additional complexity that backing up search requires, it might be a good idea to go with rebuilding the indexes for small or even medium sized farms. However, if your search database is huge, and your farm is quite big, and you need search to be online shortly after a disaster, you will need to look into an appropriate strategy for backing up search.
The reason backing up search is different than other portions of SharePoint, is because of how search works. Search data is stored in two locations, the search database, and the index files on the disk. You need both in order to be able to successfully serve search queries. Not only both, but you need both of them backed up concurrently for the restored versions to work together. In other words, if the search index was backed up 5 minutes after the search database, the index entries created in the additional 5 minutes will cause inconsistent results in the restored search.
In order to ensure this consistency, you should backup search using SharePoint 2007’s backup tool, or a third party product.

Tuesday, March 6, 2007

Change a MOSS site logo and image

By Default, MOSS will show a site logo and image.
Procedure to override this images:
  1. Open the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\IMAGES directory.
  2. Copy the images that you want to appear on the home pages of your Web sites to this directory.
  3. Remove the image files TITLEGRAPHIC.GIF and HOMEPAGE.GIF, which contain the logos used on the left and right sides of the home page, respectively.
  4. Rename the new image files TITLEGRAPHIC.GIF and HOMEPAGE.GIF.
    All sites now display new logos on their home pages.

Thursday, March 1, 2007

Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information.

I got this error while searching a 'Yes/No' field in correctly.
  1. I setup a managed property "ExtraInfo" in the SSP on a 'Yes/No' crawled property.
  2. After a full crawl, I tried to search the managed property with a string "ExtraInfo:Yes"

got the error: Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information.


  1. Search "ExtraInfo:true" instead of "ExtraInfo:Yes"
    Sharepoint crawler indexes the value with the internal boolean values "true/false".
  2. If you are searching for a vaue using the custom code in SPQuery, use '1' and '0' instead of 'yes/no' or 'true/false'.
    SPQuery goes with the crawled content with '0' and '1'.