<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Please...Just Work!</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/jhuish/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/jhuish/feed.xml</link>
    <description>I have a net to catch all the gremlins!</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:45:48 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Error When Importing Custom Search Configuration Settings - SharePoint 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/jhuish/error-when-importing-custom-search-configuration-settings-sharepoint-2013</link>
      <pubDate>Fri, 27 Jun 2014 16:23:19 GMT</pubDate>
      <dc:creator><![CDATA[Jake Huish]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/jhuish/2014/06/27/error-when-importing-custom-search-configuration-settings-sharepoint-2013/</guid>
      <description><![CDATA[Custom Search configuration settings created at the site or site collection scope, such as results...]]></description>
      <content:encoded><![CDATA[<p>Custom Search configuration settings created at the site or site collection scope, such as results sources, query rules, and result types are stored in the Search Service Application.&nbsp;&nbsp;Therefore when a site or site collection backup/restore, or export/import occurs these settings don&#39;t come along for the ride.&nbsp;</p>
<p>The best, and easiest way to maintain those settings across environments is to use the built-in Search Configuration Import/Export utility within the SharePoint UI.&nbsp; Details about this process are documented <a href="https://technet.microsoft.com/en-us/library/jj871675%28v=office.15%29.aspx" target="_blank">here</a> so I won&#39;t cover the process in this post.</p>
<p>What is important in that article, however, is that you meet the following criteria when importing:</p>
<ul>
<li><em>That the search configuration file and the target for your import do not have settings with the same name, except for managed properties.</em></li>
<li><em>That the source of your export does not include managed properties or aliases that contain the invalid characters listed in Invalid characters causing the import to fail.</em></li>
<li><em>That managed property names and aliases are unique within the combination of the search configuration file and the search configuration settings on the target site and its parent site collection.</em></li>
</ul>
<p>Also important is this list of reasons the import might fail:</p>
<ul>
<li><em>If the search configuration file and the target for your import have settings with the same name, the import of the search configuration file fails when it encounters this setting. Exceptions:</em></li>
</ul>
<ul>
<li><em>If you reimport a search configuration file, the settings that have the same name in the search configuration file and on the target do not cause the import to fail.</em></li>
<li><em>Managed properties with the same name do not cause an import to fail if the individual managed property settings are the same on the property in the search configuration file and on the target property.</em></li>
<li><em>Managed properties with the same name do not cause an import to fail if the aliases and mappings to crawled properties are different on the managed property in the search configuration file and on the target managed property. The import adds the aliases and mappings on the managed property in the search configuration file to the aliases and mappings on the target managed property.</em></li>
</ul>
<ul>
<li><em>If the search configuration file contains managed property names or aliases that contain invalid characters, the import fails when it encounters that managed property name or alias.</em></li>
<li><em>The managed property names and aliases of a search schema must be unique for a site and its parent site collection. This means:</em></li>
</ul>
<ul>
<li><em>If your search configuration file has a managed property that has the same name as an alias for a managed property on your target site or the parent site collection of your target site, then the import fails.</em></li>
<li><em>If your search configuration file has a managed property with an alias that has the same name as a managed property on your target site or the parent site collection of your target site, then the import fails.</em></li>
</ul>
<p><br />So, after trying this process and having it fail I discovered two reasons:</p>
<ol>
<li>Some of&nbsp;the&nbsp;Managed Properties in my source environment had been set to be <strong>Refinable</strong> (see above bullet point about the managed property settings being the same).&nbsp; This resolution was simple: set the target environment property settings to Refinable&hellip;Done.</li>
<li>I was getting an error that the &quot;Search Config List does not exist&quot;</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/91/searchconfigerror1.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-91/searchconfigerror1.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/91/searchconfigerror1.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-91/searchconfigerror1.png" border="0" /></a></p>
<p>This is another one of SharePoint&#39;s extremely (un)helpful errors.&nbsp; So, to the&nbsp;ULS logs I went searching for&nbsp;the correlation, which I found and looked like the following:</p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">[Forced due to logging gap, Original Level: Verbose] Ensuring that SearchConfig List feature is activated..&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">Search config settings features are installed. Verifying activation.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">Search config settings feature 41dfb393-9eb6-4fe4-af77-28e4afce8cdc was not activated. Activating &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">Feature Activation: Activating Feature &#39;SearchConfigFields&#39; (ID: &#39;41dfb393-9eb6-4fe4-af77-28e4afce8cdc&#39;) at URL <a href="https://site/">https://site</a>.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">[Forced due to logging gap, cached @ 06/27/2014 14:18:26.29, Original Level: Verbose] SQL connection time: 0.0688635008080636 for Data Source=SQLServer;Initial Catalog=Records_Content_DB;Integrated Security=True;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15;Application Name=SharePoint[w3wp][2][Records_Content_DB]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">The element of type &#39;Field&#39; for feature &#39;SearchConfigFields&#39; (id: 41dfb393-9eb6-4fe4-af77-28e4afce8cdc) threw an exception during activation: A duplicate field name &quot;Status&quot; was found.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">Feature Activation: Threw an exception, attempting to roll back.&nbsp; Feature &#39;SearchConfigFields&#39; (ID: &#39;41dfb393-9eb6-4fe4-af77-28e4afce8cdc&#39;).&nbsp; Exception: Microsoft.SharePoint.SPException: A duplicate field name &quot;Status&quot; was found.&nbsp;&nbsp;&nbsp;&nbsp; at Microsoft.SharePoint.SPFeature.HandleProvisioningException(Exception e, Boolean force)&nbsp;&nbsp;&nbsp;&nbsp; at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionFieldsAndContentTypes(SPFeaturePropertyCollection props, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce)&nbsp;&nbsp;&nbsp;&nbsp; at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce)&nbsp;&nbsp;&nbsp;&nbsp; at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">[Forced due to logging gap, cached @ 06/27/2014 14:18:26.39, Original Level: Verbose] SQL connection time: 0.131371445253517 for Data Source=SQLServer;Initial Catalog=Records_Content_DB;Integrated Security=True;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15;Application Name=SharePoint[w3wp][2][Records_Content_DB]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">[Forced due to logging gap, Original Level: VerboseEx] Reverting to process identity&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">Leaving Monitored Scope (Feature Activation: Activating Feature &#39;SearchConfigFields&#39; (ID: &#39;41dfb393-9eb6-4fe4-af77-28e4afce8cdc&#39;) at URL <a href="https://site/">https://site</a>.). Execution Time=202.671079704264&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;">Search config settings feature <span style="text-decoration:underline;"><strong>41dfb393-9eb6-4fe4-af77-28e4afce8cdc</strong></span> could not be activated. Activation failed with message 41dfb393-9eb6-4fe4-af77-28e4afce8cdc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;080f9f9c-c3c7-00e6-f747-e381d72a7204</span></p>
<p>What this told me is that the <strong>SearchConfigFields</strong> feature was not properly activating.</p>
<p>I got the ID from the ULS (underlined above) and ran the following PowerShell to manually activate the feature:</p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;"><span style="color:#ff6600;">$web</span> <span style="color:#999999;">=</span> <span style="color:#0000ff;">Get-SPWeb </span><span style="color:#000080;">-Identity</span> <span style="color:#800080;"><a href="https://mysharepointsite"><span style="color:#800080;">https://mysharepointsite</span></a></span></span></p>
<p style="margin-left:30px;"><span style="font-family:courier new,courier;font-size:small;"><span style="color:#0000ff;">Enable-SPFeature </span><span style="color:#000080;">-Identity</span> <span style="color:blueviolet;line-height:107%;font-family:&#39;Lucida Console&#39;;font-size:9pt;">41dfb393-9eb6-4fe4-af77-28e4afce8cdc</span> <span style="color:#000080;">-Url</span> <span style="color:#ff6600;">$web</span> <span style="color:#000080;">-Force -Verbose</span></span></p>
<p>The feature activated successfully.&nbsp; I was now able to import my configuration file!</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/91/searchconfigerror2.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-91/searchconfigerror2.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/91/searchconfigerror2.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-91/searchconfigerror2.png" border="0" /></a></p>
<p>There wasn&#39;t much out there about this particular error, so I hope this helps others that may run into this issue.&nbsp; Happy SharePointing!</p>]]></content:encoded>
    </item>
  </channel>
</rss>