<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/3.3.3" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>SharePoint Lessons Learned</title>
		<link>http://www.sharepointlessonslearned.com/blogs/blog1.php</link>
		<atom:link rel="self" type="application/rss+xml" href="http://www.sharepointlessonslearned.com/blogs/blog1.php?tempskin=_rss2" />
		<description></description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=3.3.3"/>
		<ttl>60</ttl>
				<item>
			<title>Workflow History Content Type has no site parent content type</title>
			<link>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/08/13/workflow-history-content-type-has-no-site-parent-content-type</link>
			<pubDate>Fri, 13 Aug 2010 20:53:45 +0000</pubDate>			<dc:creator>Perry</dc:creator>
			<category domain="main">Content Types</category>			<guid isPermaLink="false">40@http://www.sharepointlessonslearned.com/blogs/</guid>
						<description>&lt;p&gt;The Workflow History list content type, which can be found in the hidden Workflow History list, is unusual in that it has no parent content type. Normally, in a loop such as&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;foreach(SPContentType listType in list.ContentTypes)&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;em&gt;listType.Parent&lt;/em&gt;&lt;/span&gt; is a valid content type which is a site content type, but it is null for the Workflow History list content type on the Workflow History list.&lt;/p&gt;
&lt;p&gt;Note: The Workflow History list being hidden, one cannot navigate to it via View All Site Content. But if one knows its GUID, one can navigate to it via ~/_layouts/listedit.aspx?List=%7B123456%7D, where 123456 stands for the actual GUID.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/08/13/workflow-history-content-type-has-no-site-parent-content-type&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>The Workflow History list content type, which can be found in the hidden Workflow History list, is unusual in that it has no parent content type. Normally, in a loop such as</p>
<p><em><span style="font-family: courier new,courier;">foreach(SPContentType listType in list.ContentTypes)</span></em></p>
<p><span style="font-family: courier new,courier;"><em>listType.Parent</em></span> is a valid content type which is a site content type, but it is null for the Workflow History list content type on the Workflow History list.</p>
<p>Note: The Workflow History list being hidden, one cannot navigate to it via View All Site Content. But if one knows its GUID, one can navigate to it via ~/_layouts/listedit.aspx?List=%7B123456%7D, where 123456 stands for the actual GUID.</p>
<p>&#160;</p><div class="item_footer"><p><small><a href="http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/08/13/workflow-history-content-type-has-no-site-parent-content-type">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/08/13/workflow-history-content-type-has-no-site-parent-content-type#comments</comments>
			<wfw:commentRss>http://www.sharepointlessonslearned.com/blogs/blog1.php?tempskin=_rss2&#38;disp=comments&#38;p=40</wfw:commentRss>
		</item>
				<item>
			<title>Error Reactivating Publishing Site Collection Feature</title>
			<link>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/06/15/error-reactivating-publishing-site-collection-feature</link>
			<pubDate>Tue, 15 Jun 2010 12:19:42 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">SharePoint</category>			<guid isPermaLink="false">39@http://www.sharepointlessonslearned.com/blogs/</guid>
						<description>&lt;p style=&quot;color: #ff0000; font-style:bold;&quot;&gt;Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))&lt;/p&gt;
&lt;p style=&quot;FONT-FAMILY: &quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/span&gt; &lt;br /&gt;I wanted to quickly make a copy of a publishing site collection that I had been working on (for a colleague), and did the following. &lt;br /&gt;&lt;br /&gt;First, as stated above, the site I wanted a copy of was a SP Publishing Site. I knew from preious experience that one is unable to save a publishing site as a site template (it's not supported by Microsoft for good (although unfortunate) reason). &lt;br /&gt;&lt;br /&gt;That being said, I moved forward with an unsupported workaround (FYI, this was in a &lt;em&gt;development&lt;/em&gt; environment). I deactivated both the Site Collection and Site/Web Publishing Features ([Office SharePoint Server Publishing Infrastructure], and [Office SharePoint Server Publishing] respectively). Once deactivated I had the menu option &quot;Save site as template&quot; available to me (under &lt;em&gt;Site Actions &amp;gt;&amp;gt; Look and Feel &lt;/em&gt;), and was able to successfully save the site as a site template.&lt;br /&gt;&lt;br /&gt;Upon&amp;#160;my attempt to reactivate the site collection publishing feature (that&amp;#160;I had deactivated in the previous step) I ran into the following exception:&lt;/p&gt;
&lt;p style=&quot;PADDING-LEFT: 30px; FONT-FAMILY: &quot;&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&lt;em&gt;Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))&lt;/em&gt;&amp;#160;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;FONT-FAMILY: &quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;&lt;strong&gt;Solution&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;To resolve this problem I ran the following stsadm commands (replacing &quot;URL&quot; with the actual URL of the Site Collection) - which I found on a Technet forum,&amp;#160;posted by Chris Winebarger.&lt;/p&gt;
&lt;p style=&quot;FONT-FAMILY: &quot;&gt;stsadm -o activatefeature -filename publishing\feature.xml -url &lt;a href=&quot;http://URL&quot;&gt;http://URL&lt;/a&gt; -force &lt;br /&gt;stsadm -o activatefeature -filename publishingresources\feature.xml -url &lt;a href=&quot;http://URL&quot;&gt;http://URL&lt;/a&gt; -force &lt;br /&gt;stsadm -o activatefeature -filename publishingSite\feature.xml -url &lt;a href=&quot;http://URL&quot;&gt;http://URL&lt;/a&gt; -force &lt;br /&gt;stsadm -o activatefeature -filename publishingweb\feature.xml -url &lt;a href=&quot;http://URL&quot;&gt;http://URL&lt;/a&gt; -force &lt;br /&gt;stsadm -o activatefeature -filename publishinglayouts\feature.xml -url &lt;a href=&quot;http://URL&quot;&gt;http://URL&lt;/a&gt; -force &lt;br /&gt;stsadm -o activatefeature -filename navigation\feature.xml -url &lt;a href=&quot;http://URL&quot;&gt;http://URL&lt;/a&gt; -force&lt;/p&gt;
&lt;p style=&quot;FONT-FAMILY: &quot;&gt;&lt;br /&gt;All was then back to normal.&lt;/p&gt;
&lt;p style=&quot;FONT-FAMILY: &quot;&gt;&lt;br /&gt;&lt;strong&gt;Reference: &lt;/strong&gt;&lt;br /&gt;&lt;em&gt;Chris Winebarger's post on a SharePoint Technet Forum&amp;#160;&lt;br /&gt;&lt;/em&gt;&lt;a title=&quot;http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/13da092f-8c6f-44c8-a99b-140e277c8d55&quot; href=&quot;http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/13da092f-8c6f-44c8-a99b-140e277c8d55&quot;&gt;&lt;em&gt;http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/13da092f-8c6f-44c8-a99b-140e277c8d55&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/06/15/error-reactivating-publishing-site-collection-feature&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p style="color: #ff0000; font-style:bold;">Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))</p>
<p style="FONT-FAMILY: "><span style="font-family: arial,helvetica,sans-serif;"><strong>Background</strong></span> <br />I wanted to quickly make a copy of a publishing site collection that I had been working on (for a colleague), and did the following. <br /><br />First, as stated above, the site I wanted a copy of was a SP Publishing Site. I knew from preious experience that one is unable to save a publishing site as a site template (it's not supported by Microsoft for good (although unfortunate) reason). <br /><br />That being said, I moved forward with an unsupported workaround (FYI, this was in a <em>development</em> environment). I deactivated both the Site Collection and Site/Web Publishing Features ([Office SharePoint Server Publishing Infrastructure], and [Office SharePoint Server Publishing] respectively). Once deactivated I had the menu option "Save site as template" available to me (under <em>Site Actions &gt;&gt; Look and Feel </em>), and was able to successfully save the site as a site template.<br /><br />Upon&#160;my attempt to reactivate the site collection publishing feature (that&#160;I had deactivated in the previous step) I ran into the following exception:</p>
<p style="PADDING-LEFT: 30px; FONT-FAMILY: "><span style="color: #ff0000;"><em>Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))</em>&#160;</span></p>
<p style="FONT-FAMILY: "><span style="font-family: arial,helvetica,sans-serif;"><strong>Solution</strong></span><br />To resolve this problem I ran the following stsadm commands (replacing "URL" with the actual URL of the Site Collection) - which I found on a Technet forum,&#160;posted by Chris Winebarger.</p>
<p style="FONT-FAMILY: ">stsadm -o activatefeature -filename publishing\feature.xml -url <a href="http://URL">http://URL</a> -force <br />stsadm -o activatefeature -filename publishingresources\feature.xml -url <a href="http://URL">http://URL</a> -force <br />stsadm -o activatefeature -filename publishingSite\feature.xml -url <a href="http://URL">http://URL</a> -force <br />stsadm -o activatefeature -filename publishingweb\feature.xml -url <a href="http://URL">http://URL</a> -force <br />stsadm -o activatefeature -filename publishinglayouts\feature.xml -url <a href="http://URL">http://URL</a> -force <br />stsadm -o activatefeature -filename navigation\feature.xml -url <a href="http://URL">http://URL</a> -force</p>
<p style="FONT-FAMILY: "><br />All was then back to normal.</p>
<p style="FONT-FAMILY: "><br /><strong>Reference: </strong><br /><em>Chris Winebarger's post on a SharePoint Technet Forum&#160;<br /></em><a title="http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/13da092f-8c6f-44c8-a99b-140e277c8d55" href="http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/13da092f-8c6f-44c8-a99b-140e277c8d55"><em>http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/13da092f-8c6f-44c8-a99b-140e277c8d55</em></a></p><div class="item_footer"><p><small><a href="http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/06/15/error-reactivating-publishing-site-collection-feature">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/06/15/error-reactivating-publishing-site-collection-feature#comments</comments>
			<wfw:commentRss>http://www.sharepointlessonslearned.com/blogs/blog1.php?tempskin=_rss2&#38;disp=comments&#38;p=39</wfw:commentRss>
		</item>
				<item>
			<title>Open Link List Items in New Window</title>
			<link>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/04/28/open-link-list-items-in-new-window</link>
			<pubDate>Wed, 28 Apr 2010 16:50:48 +0000</pubDate>			<dc:creator>Doug</dc:creator>
			<category domain="main">Scripts</category>			<guid isPermaLink="false">38@http://www.sharepointlessonslearned.com/blogs/</guid>
						<description>&lt;p&gt;Let me first start by saying the script we're providing is adapted from script posted by Ricky Spears (&lt;a href=&quot;http://sharepointsolutions.blogspot.com/2007/09/make-selected-links-in-links-list-open.html&quot;&gt;http://sharepointsolutions.blogspot.com/2007/09/make-selected-links-in-links-list-open.html&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;OOB Sharepoint Link Lists do not provide you the option to have a links open in a new window. The following steps and script will allow for such functionality.&lt;/p&gt;
&lt;p&gt;Steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a Content Editor Web Part (&lt;em&gt;CEWP&lt;/em&gt;) to the page where the linked list web part is located.&lt;/li&gt;
&lt;li&gt;Select &lt;em&gt;Modify Shared Web Part &lt;/em&gt;on the newly added &lt;em&gt;CEWP&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Now click the &quot;&lt;em&gt;Source Editor...&lt;/em&gt;&quot; button that is now present and insert the following script (Note, you can choose to hide the title and chrome of this web part so that it is, in-effect, hidden from the end-user):
&lt;pre class=&quot;brush: c-sharp;&quot;&gt;
&amp;lt;script language=&quot;JavaScript&quot;&amp;gt;
_spBodyOnLoadFunctionNames.push(&quot;rewriteLinks&quot;);
        
function rewriteLinks() {
  //create an array to store all
  var anchors = document.getElementsByTagName(&quot;a&quot;);
            
  //loop through the array
  for (var x=0; x&amp;lt;anchors.length; x++) {
    //check to see if the current anchor element contain #openinnewwindow
    if (anchors[x].outerHTML.indexOf('#openinnewwindow')&amp;gt;0) {
      //add the [target] attribute and rewrite the [href] attribute
      anchors[x].target = &quot;_blank&quot;;
      anchors[x].href = anchors[x].href.replace(/#openinnewwindow/,'');
    }
  }
}
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Next, add a new link to the linked list and append the following text to the end of your URL &quot;&lt;em&gt;#openinnewwindow&lt;/em&gt;&quot; (e.g. &lt;a href=&quot;http://www.google.com#openinnewwindow&quot;&gt;http://www.google.com#openinnewwindow&lt;/a&gt; ).&lt;/li&gt;
&lt;li&gt;Finally, click on your link and it will now open in a new window.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; &lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/04/28/open-link-list-items-in-new-window&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Let me first start by saying the script we're providing is adapted from script posted by Ricky Spears (<a href="http://sharepointsolutions.blogspot.com/2007/09/make-selected-links-in-links-list-open.html">http://sharepointsolutions.blogspot.com/2007/09/make-selected-links-in-links-list-open.html</a>)</p>
<p>OOB Sharepoint Link Lists do not provide you the option to have a links open in a new window. The following steps and script will allow for such functionality.</p>
<p>Steps:</p>
<ol>
<li>Add a Content Editor Web Part (<em>CEWP</em>) to the page where the linked list web part is located.</li>
<li>Select <em>Modify Shared Web Part </em>on the newly added <em>CEWP</em></li>
<li>Now click the "<em>Source Editor...</em>" button that is now present and insert the following script (Note, you can choose to hide the title and chrome of this web part so that it is, in-effect, hidden from the end-user):
<pre class="brush: c-sharp;">
&lt;script language="JavaScript"&gt;
_spBodyOnLoadFunctionNames.push("rewriteLinks");
        
function rewriteLinks() {
  //create an array to store all
  var anchors = document.getElementsByTagName("a");
            
  //loop through the array
  for (var x=0; x&lt;anchors.length; x++) {
    //check to see if the current anchor element contain #openinnewwindow
    if (anchors[x].outerHTML.indexOf('#openinnewwindow')&gt;0) {
      //add the [target] attribute and rewrite the [href] attribute
      anchors[x].target = "_blank";
      anchors[x].href = anchors[x].href.replace(/#openinnewwindow/,'');
    }
  }
}
&lt;/script&gt;
</pre>
</li>
<li>Next, add a new link to the linked list and append the following text to the end of your URL "<em>#openinnewwindow</em>" (e.g. <a href="http://www.google.com#openinnewwindow">http://www.google.com#openinnewwindow</a> ).</li>
<li>Finally, click on your link and it will now open in a new window.</li>
</ol>
<p> </p><div class="item_footer"><p><small><a href="http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/04/28/open-link-list-items-in-new-window">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/04/28/open-link-list-items-in-new-window#comments</comments>
			<wfw:commentRss>http://www.sharepointlessonslearned.com/blogs/blog1.php?tempskin=_rss2&#38;disp=comments&#38;p=38</wfw:commentRss>
		</item>
				<item>
			<title>Site Column references in the [ContentTypeUsage] table</title>
			<link>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/04/20/site-column-references-in-the-contenttypes-table</link>
			<pubDate>Tue, 20 Apr 2010 15:56:46 +0000</pubDate>			<dc:creator>Perry</dc:creator>
			<category domain="main">SharePoint</category>
<category domain="alt">Content Types</category>
<category domain="alt">Fields</category>			<guid isPermaLink="false">37@http://www.sharepointlessonslearned.com/blogs/</guid>
						<description>&lt;p&gt;Counterintuitively, Site Columns -- probably FieldRefs inside of Content Types -- are stored in the [ContentTypeUsage] table. Futhermore, and also counterintuitively, the site column (field) ID is stored in the [ListId] column, and the [IsFieldId] field is zero.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/04/20/site-column-references-in-the-contenttypes-table&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Counterintuitively, Site Columns -- probably FieldRefs inside of Content Types -- are stored in the [ContentTypeUsage] table. Futhermore, and also counterintuitively, the site column (field) ID is stored in the [ListId] column, and the [IsFieldId] field is zero.</p><div class="item_footer"><p><small><a href="http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/04/20/site-column-references-in-the-contenttypes-table">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/04/20/site-column-references-in-the-contenttypes-table#comments</comments>
			<wfw:commentRss>http://www.sharepointlessonslearned.com/blogs/blog1.php?tempskin=_rss2&#38;disp=comments&#38;p=37</wfw:commentRss>
		</item>
				<item>
			<title>Inconvenience of Object Model field lookup</title>
			<link>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/12/inconvenience-of-object-model-field-lookup</link>
			<pubDate>Fri, 12 Mar 2010 18:15:36 +0000</pubDate>			<dc:creator>Perry</dc:creator>
			<category domain="main">SharePoint</category>			<guid isPermaLink="false">36@http://www.sharepointlessonslearned.com/blogs/</guid>
						<description>&lt;p&gt;SPView.ViewFields is a collection of &lt;em&gt;&lt;strong&gt;internal field&lt;/strong&gt;&lt;/em&gt; names, according to MSDN. (It is not a list of display names, as can be seen by examining the view fields of the 'UserInformationList' list).&lt;br /&gt;&lt;br /&gt;This is surprisingly inconvenient, as SPList.Fields is indexed only by &lt;em&gt;&lt;strong&gt;display name&lt;/strong&gt;&lt;/em&gt; (or GUID, or index), and not by internal name at all.&lt;br /&gt;&lt;br /&gt;Therefore, to map from internal names (such as are held in SPViewFields, or are encoded in CAML expressions), one cannot simply use the SPList.Fields accessor. One needs first build a dictionary mapping all internal names to something useful (e.g., GUID).&lt;br /&gt;&lt;br /&gt;I can only guess that the SharePoint internal code uses some other (inaccessible) means for finding fields from the internal names -- which it must do frequently in rendering views and CAML.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/12/inconvenience-of-object-model-field-lookup&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>SPView.ViewFields is a collection of <em><strong>internal field</strong></em> names, according to MSDN. (It is not a list of display names, as can be seen by examining the view fields of the 'UserInformationList' list).<br /><br />This is surprisingly inconvenient, as SPList.Fields is indexed only by <em><strong>display name</strong></em> (or GUID, or index), and not by internal name at all.<br /><br />Therefore, to map from internal names (such as are held in SPViewFields, or are encoded in CAML expressions), one cannot simply use the SPList.Fields accessor. One needs first build a dictionary mapping all internal names to something useful (e.g., GUID).<br /><br />I can only guess that the SharePoint internal code uses some other (inaccessible) means for finding fields from the internal names -- which it must do frequently in rendering views and CAML.</p><div class="item_footer"><p><small><a href="http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/12/inconvenience-of-object-model-field-lookup">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/12/inconvenience-of-object-model-field-lookup#comments</comments>
			<wfw:commentRss>http://www.sharepointlessonslearned.com/blogs/blog1.php?tempskin=_rss2&#38;disp=comments&#38;p=36</wfw:commentRss>
		</item>
				<item>
			<title>Inadvertently Creating a Publishing Site when Publishing Feature is Not Enabled</title>
			<link>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/11/inadvertently-creating-a-publishing-site-when-publishing-feature-is-not-enabled</link>
			<pubDate>Thu, 11 Mar 2010 20:23:35 +0000</pubDate>			<dc:creator>jdnewberry</dc:creator>
			<category domain="alt">Background</category>
<category domain="main">SharePoint</category>			<guid isPermaLink="false">35@http://www.sharepointlessonslearned.com/blogs/</guid>
						<description>&lt;p&gt;If you are&amp;#160;creating a new site in a site collection, and inadvertently create a publishing site while the publishing feature is not enabled at the site collection level, I've noticed some strange functionality.&lt;/p&gt;
&lt;p&gt;An Error message will be displayed that states:&lt;br /&gt;&quot;&lt;em&gt;The Office SharePoint Server Publishing Infrastructure feature must be activated at the site collection level before the Publishing feature can be activated.&lt;/em&gt;&quot;&lt;/p&gt;
&lt;p&gt;The site that you have attempted to create&amp;#160;will&amp;#160;still&amp;#160;be viewable from the &lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;&quot;&gt;&lt;strong&gt;View All Site Content&lt;/strong&gt; link (then look&amp;#160;under Sites and Workspaces) but will generate a 404 error if you attempt to browse to the root (either by clicking the link under view all site content, or manually browsing to the site name you've chosen). This is because the site was created, but was not given a default.aspx page.&amp;#160;I've found that the only way to delete this broken site, is to browse manually to the site's settings page (which does exist). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;&quot;&gt;This can be navigated to like such:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;&quot;&gt;http(s)://portal_url/site_collection_name/broken_site_name/&lt;strong&gt;_layouts/settings.aspx&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;&quot;&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;&quot;&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;&quot;&gt;Apparently, stsadm does not create this broken site.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/11/inadvertently-creating-a-publishing-site-when-publishing-feature-is-not-enabled&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>If you are&#160;creating a new site in a site collection, and inadvertently create a publishing site while the publishing feature is not enabled at the site collection level, I've noticed some strange functionality.</p>
<p>An Error message will be displayed that states:<br />"<em>The Office SharePoint Server Publishing Infrastructure feature must be activated at the site collection level before the Publishing feature can be activated.</em>"</p>
<p>The site that you have attempted to create&#160;will&#160;still&#160;be viewable from the <span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><strong>View All Site Content</strong> link (then look&#160;under Sites and Workspaces) but will generate a 404 error if you attempt to browse to the root (either by clicking the link under view all site content, or manually browsing to the site name you've chosen). This is because the site was created, but was not given a default.aspx page.&#160;I've found that the only way to delete this broken site, is to browse manually to the site's settings page (which does exist). </span></p>
<p><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">This can be navigated to like such:</span></p>
<p><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">http(s)://portal_url/site_collection_name/broken_site_name/<strong>_layouts/settings.aspx</strong></span></p>
<p><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><strong></strong></span></p>
<p><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><strong>UPDATE:</strong></span></p>
<p><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">Apparently, stsadm does not create this broken site.</span></p><div class="item_footer"><p><small><a href="http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/11/inadvertently-creating-a-publishing-site-when-publishing-feature-is-not-enabled">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/11/inadvertently-creating-a-publishing-site-when-publishing-feature-is-not-enabled#comments</comments>
			<wfw:commentRss>http://www.sharepointlessonslearned.com/blogs/blog1.php?tempskin=_rss2&#38;disp=comments&#38;p=35</wfw:commentRss>
		</item>
				<item>
			<title>SPFeatureCollection Add is not equivalent to activating a feature</title>
			<link>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/09/spfeaturecollection-add-is-not-equivalent-to-activating-a-feature</link>
			<pubDate>Wed, 10 Mar 2010 02:59:54 +0000</pubDate>			<dc:creator>Perry</dc:creator>
			<category domain="alt">Background</category>
<category domain="main">Features</category>			<guid isPermaLink="false">34@http://www.sharepointlessonslearned.com/blogs/</guid>
						<description>&lt;h3&gt;Problems with SPFeatureCollection.Add&lt;/h3&gt;
&lt;br /&gt;
&lt;h5&gt;#1) SPFeature.Add ignores access denied failure&lt;/h5&gt;
&lt;p&gt;&lt;br /&gt;My major problem with SPFeatureCollection.Add is that it does not report failure due to access denied.&lt;br /&gt;&lt;br /&gt;In the case of attempting to add a site collection feature, when the current user is not a site collection administrator, SPFeatureCollection.Add will create a new SPFeature object in the collection and return it, although the feature has not actually been activated on the site collection. I expected to be able to work around this by creating a new SPSite object (pointing to the same site collection) and checking its features collection, but no -- the new feature appears there as well.&lt;br /&gt;&lt;br /&gt;For this reason, SharePoint Solution Installer does not report activation failures -- because they seem undetectable at the API level.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;h5&gt;#2) SPFeatureCollection Add &amp;amp; Remove act differently than GUI if feature receiver not found&lt;/h5&gt;
&lt;p&gt;My second problem with SPFeatureCollection, Add and Remove both, is that they succeed silently in the face of feature receiver misconfiguration. From the GUI, activating or deactivating a feature missing its feature receiver assembly will fail, with a fairly descriptive error message (if custom errors are disabled). However, SPFeatureCollection Add and Remove will both actually succeed in this case.&lt;br /&gt;&lt;br /&gt;This can be useful; it is a workaround to deactivate a feature which cannot be deactivated from the GUI.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/09/spfeaturecollection-add-is-not-equivalent-to-activating-a-feature&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<h3>Problems with SPFeatureCollection.Add</h3>
<br />
<h5>#1) SPFeature.Add ignores access denied failure</h5>
<p><br />My major problem with SPFeatureCollection.Add is that it does not report failure due to access denied.<br /><br />In the case of attempting to add a site collection feature, when the current user is not a site collection administrator, SPFeatureCollection.Add will create a new SPFeature object in the collection and return it, although the feature has not actually been activated on the site collection. I expected to be able to work around this by creating a new SPSite object (pointing to the same site collection) and checking its features collection, but no -- the new feature appears there as well.<br /><br />For this reason, SharePoint Solution Installer does not report activation failures -- because they seem undetectable at the API level.</p>
<p>&#160;</p>
<h5>#2) SPFeatureCollection Add &amp; Remove act differently than GUI if feature receiver not found</h5>
<p>My second problem with SPFeatureCollection, Add and Remove both, is that they succeed silently in the face of feature receiver misconfiguration. From the GUI, activating or deactivating a feature missing its feature receiver assembly will fail, with a fairly descriptive error message (if custom errors are disabled). However, SPFeatureCollection Add and Remove will both actually succeed in this case.<br /><br />This can be useful; it is a workaround to deactivate a feature which cannot be deactivated from the GUI.</p><div class="item_footer"><p><small><a href="http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/09/spfeaturecollection-add-is-not-equivalent-to-activating-a-feature">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/09/spfeaturecollection-add-is-not-equivalent-to-activating-a-feature#comments</comments>
			<wfw:commentRss>http://www.sharepointlessonslearned.com/blogs/blog1.php?tempskin=_rss2&#38;disp=comments&#38;p=34</wfw:commentRss>
		</item>
				<item>
			<title>Field Name Uniqueness Rules vary between GUI and API</title>
			<link>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/04/field-name-uniqueness-rules-vary-between-gui-and-api</link>
			<pubDate>Thu, 04 Mar 2010 20:51:23 +0000</pubDate>			<dc:creator>Perry</dc:creator>
			<category domain="alt">SharePoint</category>
<category domain="main">Fields</category>			<guid isPermaLink="false">33@http://www.sharepointlessonslearned.com/blogs/</guid>
						<description>&lt;p&gt;SharePoint site settings GUI will not let you create a column with a display name already in use (as an existing site column, even inherited from higher level site)&lt;br /&gt;&lt;br /&gt;SharePoint site settings GUI will adjust the field's InternalName and StaticName both to make them unique among site columns.&lt;br /&gt;&lt;br /&gt;When adding columns to a list, it is possible to get two fields with the same StaticName, but not with the same InternalName.&lt;br /&gt;&lt;br /&gt;SharePoint seems to append a 0 at the end to make list columns InternalName unique, but a 1 at the end to make site column InternalName (&amp;amp; StaticName) unique&lt;br /&gt;&lt;br /&gt;Installing a solution with a field with all 3 matching names xml-Title (DisplayName), xml-StaticName (StaticName), xml-Name (InternalName), will succeed but silently fail to install that field.&lt;br /&gt;&lt;br /&gt;But it is possible to successfully install a solution a field with the same xml-Title (DisplayName), xml-StaticName (StaticName), as long as the xml-Name (InternalName) is unique.&lt;br /&gt;&lt;br /&gt;Summary:&lt;br /&gt;&lt;br /&gt;Site Column GUI: DisplayName must be unique. SharePoint will adjust StaticName &amp;amp; InternalName to keep them unique.&lt;br /&gt;&lt;br /&gt;Feature installation of site column: xml-Name (InternalName) must be unique. SharePoint will allow duplicate DisplayName &amp;amp; StaticName.&lt;br /&gt;&lt;br /&gt;List Column GUI: DisplayName must be unique. SharePoint will adjust StaticName &amp;amp; InternalName to keep them unique.&lt;br /&gt;&lt;br /&gt;Adding site columns to list columns via GUI: DisplayName and StaticName don't have to be unique. SharePoint will make InternalName unique.&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/04/field-name-uniqueness-rules-vary-between-gui-and-api&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>SharePoint site settings GUI will not let you create a column with a display name already in use (as an existing site column, even inherited from higher level site)<br /><br />SharePoint site settings GUI will adjust the field's InternalName and StaticName both to make them unique among site columns.<br /><br />When adding columns to a list, it is possible to get two fields with the same StaticName, but not with the same InternalName.<br /><br />SharePoint seems to append a 0 at the end to make list columns InternalName unique, but a 1 at the end to make site column InternalName (&amp; StaticName) unique<br /><br />Installing a solution with a field with all 3 matching names xml-Title (DisplayName), xml-StaticName (StaticName), xml-Name (InternalName), will succeed but silently fail to install that field.<br /><br />But it is possible to successfully install a solution a field with the same xml-Title (DisplayName), xml-StaticName (StaticName), as long as the xml-Name (InternalName) is unique.<br /><br />Summary:<br /><br />Site Column GUI: DisplayName must be unique. SharePoint will adjust StaticName &amp; InternalName to keep them unique.<br /><br />Feature installation of site column: xml-Name (InternalName) must be unique. SharePoint will allow duplicate DisplayName &amp; StaticName.<br /><br />List Column GUI: DisplayName must be unique. SharePoint will adjust StaticName &amp; InternalName to keep them unique.<br /><br />Adding site columns to list columns via GUI: DisplayName and StaticName don't have to be unique. SharePoint will make InternalName unique.<br /></p><div class="item_footer"><p><small><a href="http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/04/field-name-uniqueness-rules-vary-between-gui-and-api">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.sharepointlessonslearned.com/blogs/blog1.php/2010/03/04/field-name-uniqueness-rules-vary-between-gui-and-api#comments</comments>
			<wfw:commentRss>http://www.sharepointlessonslearned.com/blogs/blog1.php?tempskin=_rss2&#38;disp=comments&#38;p=33</wfw:commentRss>
		</item>
			</channel>
</rss>
