Showing posts with label Administration. Show all posts
Showing posts with label Administration. Show all posts

Sunday, August 15, 2010

Metadata Property Mappings - Managed Property not populating with data

Managed Property not populating with data


I was playing around with search scopes and result page XSL templates in order to develop a search solution that incorporates custom fields from a content type used on multiple site collections.  Content types containing custom columns that were to be searched across, as well as displayed in the search results.


The same content type has been reused multiple times across the primary site collection, and has also been deployed and used multiple time in other site collections.  When configuring managed metadata property mappings for the custom fields, I was able to map each field to a managed property by searching for the field name.


I was then able to create an advanced search page the included the custom properties.  When incorporating the additional managed properties into the search results, I found that only items from the original (primary) site collection would have data associated with the custom mappings.

The content type had been deployed to each site collection by deploying and enabling an InfoPath Form Service solution.  The content type created once enabled was then associated with the form library from each site collection.  I found that the internal column names from the content types on all site collections except for the primary site collection were set in the format of an Id, and not the text representation for column names the original content type.


To allow the managed properties to contain data from a particular column across each site collection, I needed to do one of the two things:


1. Remove and re-create the column on the site collections where the column names were set as Ids. This resulted in the column names reverting to the same text name of the equivalent column on the primary site collection.  The search crawler then maps data from the column on each site collection.  


Or: 


2. Update the managed properties so that each instance of the column in each site collection is mapped to the Managed Property in Central Administration.  To do this, I needed to obtain the internal column names, which in this case were in the same format as a list or column id in SharePoint.  When finding columns from the SharePoint farm to map to the managed property, searching for part of the column id resulted in the column being found.  After adding each instance of the columns from all site collections using the column ids, I then selected the option to “Include values from a single crawled property based on the order specified”.  This results in the managed property being populated with data from one of the mapped columns only, which will be the first one that contains data in the order specified.


After performing a full crawl of all site collections in the farm, the search results successfully incorporated the custom managed properties.  The advanced search now searched across all site collections to find items using values in the custom fields.

Wednesday, December 16, 2009

SharePoint, Web Programming & SEO Resources

Web-Resource.org - SharePoint, Web Programming & SEO Resources

Web-resource.org provide a range of resources from around the web for Web Development & Programming, SharePoint & InfoPath Development and Search Engine Optimisation. Resources have been hand selected by the team at Web-Resource.org, and suggested by users.


SharePoint & InfoPath Resources

A range of tools and resources are provided by Web-Resource.org for Administering, Designing, Customising and Developing a SharePoint environment. Resources include a range of articles with tips, how to's, tutorials, third party utilities for administering and developing SharePoint. Tutorials are also available to help with InfoPath form development and integration with SharePoint.
SharePoint Design & Customisation resources include tutorials for creating and customising Data View Web Parts to display data from SharePoint lists which is formatted based on metadata values for each list item. This includes the ability to format rows of a task list for example, to set the background or text colour of the task item to a color which represents the priority or amount of time until due. The articles specifically describe how to format tasks based on the due date and other fields. An overdue item can be formatted with a red background and bold text. Items which are due within three days are formatted orange, 1 week: yellow, 1 month: green. When the conditional formatting is combined with sorting and grouping, a Data View can display a large amount of information in a logical and readable format.

SharePoint Administration resources include tips and techniques for configuring SharePoint environments of various sizes, migrating content and configuration databases, tips and techniques to help when troubleshooting errors and issues with a SharePoint environment and much more. Other administrative tips and resources include configuring profile imports for multiple Active Directory domains, installing and registering custom web parts assemblies to be used on Web Part pages.
InfoPath form development resources include tutorials for creating and using Data Connections to lists on SharePoint sites from the InfoPath form. Tips and tutorials to help with the management of form templates and content types in SharePoint are available, including troubleshooting outcomes and information relating to using InfoPath forms as the Interface for SharePoint systems which comprise of many lists, libraries and workflows.
Web-resource.org also provide a section for SharePoint & InfoPath Forums, Blogs and Communities which all contain many resources to help you learn SharePoint and InfoPath. Go to the SharePoint Forums, Blogs & Communities section. Go to the InfoPath Forums, Blogs & Communities section.
View the SharePoint & InfoPath Resources on Web-Resource.org:
Other sites providing SharePoint / InfoPath Resources:


Web Development & Programming Resources

The Web Development & Programming resources section contains useful tools and resources for developing websites and web applications, and using various programming languages to customise and integrate different systems and software. Programming languages include PHP, Web Application Development, HTML, CSS, JavaScript, ASP.NET, XML, VB, .NET Framework and more.
A section for free Php Scripts provided by Web-Resource.org and from around the web. The php scripts provided by Web-Resource.org include a free Php RSS 2 Writer script, which can be used to generate an RSS feed from website or database content. Create your own RSS feeds for your site with php.
Popular Web-Development & Programming Forums, Blogs and Communities are also listed available under the Web Development & Programming Resources section of Web-Resource.org

Other recommended Web Development & Programming sites and resources:



Search Engine Optimisation (SEO) Resources

Increase traffic to your site by optimising for Search Engines. Web-Resource.org provide a range of tips, tools and resources for getting started with optimising websites for Search Engines. Boost traffic to your website using various link building techniques and tools which are sometime known as offsite optimisation. Information about onsite optimisation tools and techniques for web & search engine marketing is also provided, including SEO & Search Marketing Tips to help improve your site ranking in Search Engines.

Resources include a SEO Forums and Communities section, which provides a list of some of the popular networking sites and tools to help with learning and applying Search Engine Optimisation techniques to a website.

Other sites providing SEO Tools & Resources:
Free SEO - Bulk Ping
Web Marketing Tips
SEO Tips for Blogger

Monday, December 14, 2009

Where is SharePoint web.config?

There is a separate web.config file for each Web Application / IIS Website which is running an instance of SharePoint. For example, if Sharepoint, Central Admin and the MySite host are all running as separate Web applications (different Application pools) on separate IIS sites, there will be a web.config file in the root of the virtual directory for each application. There is also a separate web.config file which contains configuration details for the "_layouts", "_catalogs", etc directories of SharePoint sites.

You should not make changes to the web.config file in a production environment, or while in production. Back up your entire SharePoint environment, including all databases prior to commencing any major troubleshooting or configuration changes. You should attempt and test any modifications to the web.config file in a non-production environment which is configured the same as the live environment. Once you are confident the the changes apply the necessary changes if required to the live environment while it is not in use. The IIS Website will automatically reset when the web.config file is saved so changes will be applied immediately. Be sure that you have not left syntax or any other errors in the file before saving changes.

The web.config files are genearally found in the following locations:

  • web.config file in the root folder of each virtual server / IIS Application.

Local_Drive:\Inetpub\wwwroot

This is the usually the file that contains most of the web configuration of a SharePoint site collection. To display full errors you would need to modify this web.config file. There may be one for each of the SharePoint applications running in some cases (MySites, Multiple Portals or Instances of SharePoint, Central Admin, etc.). If this is the case, you will only need to modify the web.config file which is in the root of the virtual directory for the instance of SharePoint which you using. To find out which directory is used by various SharePoint applications/websites, view the properties of the SharePoint website in IIS and from the "Home Directory" tab, the value in the "Local path" field will take you to the directory where the web.config file is for the specific instance of SharePoint / Application in IIS.














  • web.config file used in Web Part resources for the Global Assembly Cache (GAC)
Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources

  • web.config configuration file(s) for extending other virtual servers
Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\CONFIG

  • web.config file which defines configuration settings for the /_vti_bin virtual directory
Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\ISAPI
  • web.config file which defines configuration settings for the /_layouts virtual directory
Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\LAYOUTS

  • web.config configuration file for Central Administration pages.
Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\ADMIN\Locale_ID

SharePoint Web.Config: How to Show Full Errors

Enable display of error details and stack trace when an error occurs

Replace the following error messages with a more meaningful description of the cause of the error by disabling custom errors and enabling the track trace to be displayed as well.

An unexpected error has occurred

An error occurred during the processing of...

To display full errors and the stack trace of the error, you need to modify the web.config file for the Web Application which SharePoint is running on. There are a number of web.config files required to configure various components of SharePoint. For help finding the correct web.config file, see Where is SharePoint web.config? See notes below for more information about modifying the web.config file to display errors.




Enable Custom Errors: Set the customErrors mode to "Off"


Find:

<system.web> ...

<customErrors mode="On" />

Change To:

<system.web> ...

<customErrors mode="Off" />



Enable the Call Stack Trace: Set the CallStack value of the SafeMode element to "true"

Find:

<SharePoint>

<SafeMode ... CallStack="false" ... >

</SharePoint>


Change To:

<SharePoint>

<SafeMode ... CallStack="true" ... >

</SharePoint>



Enable Debugging Mode: Set batch and debug to "true"

Find: <compilation batch="false" debug="false">
Change To: <compilation batch="true" debug="true">


Enable the ASP.NET tracing feature:
Include the following line in the <system.web> element of the web.config file.

<system.web> ...

<trace enabled="true" pageOutput="true"/>



By default, SharePoint will only display a basic message to users when an error occurs. The message is virtually useless when trying to troubleshoot an issue, so by enabling more descriptive errors to display, including the stack trace which should help you find the cause of the error. You should not make changes to the web.config file in a production environment, or while in production. Back up your entire SharePoint environment, including all databases prior to commencing any major troubleshooting. You should attempt to replicate and resolve the problem in a non-production environment, and apply the necessary changes to the live environment when it is not in production. In many cases, the web.config will not need to be modified in the live environment as the cause of an error will be known after troubleshooting in a production environment.

For more information about the web.config file, where to find it and which one needs to be modified, see
Where is SharePoint web.config?


Related: