Fixes tests, updates examine, fixes how __Path is stored
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
<ItemGroup>
|
||||
<!-- note: NuGet deals with transitive references now -->
|
||||
<PackageReference Include="Examine">
|
||||
<Version>1.0.0-beta024</Version>
|
||||
<Version>1.0.0-beta025</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="NPoco" Version="3.6.1" />
|
||||
|
||||
@@ -378,9 +378,10 @@ namespace Umbraco.Examine
|
||||
base.OnTransformingIndexValues(e);
|
||||
|
||||
//ensure special __Path field
|
||||
if (e.IndexItem.ValueSet.Values.TryGetValue("path", out var path) && e.IndexItem.ValueSet.Values.ContainsKey(IndexPathFieldName) == false)
|
||||
var path = e.IndexItem.ValueSet.GetValue("path");
|
||||
if (path != null)
|
||||
{
|
||||
e.IndexItem.ValueSet.Values[IndexPathFieldName] = new List<object> { path };
|
||||
e.IndexItem.ValueSet.Set(IndexPathFieldName, path);
|
||||
}
|
||||
|
||||
//strip html of all users fields if we detect it has HTML in it.
|
||||
@@ -390,8 +391,7 @@ namespace Umbraco.Examine
|
||||
{
|
||||
if (value.Value.Count > 0)
|
||||
{
|
||||
var str = value.Value.First() as string;
|
||||
if (str != null)
|
||||
if (value.Value.First() is string str)
|
||||
{
|
||||
if (XmlHelper.CouldItBeXml(str))
|
||||
{
|
||||
|
||||
@@ -136,7 +136,9 @@ namespace Umbraco.Tests.PublishedContent
|
||||
public void Do_Not_Find_In_Recycle_Bin()
|
||||
{
|
||||
using (var luceneDir = new RandomIdRamDirectory())
|
||||
using (var indexer = IndexInitializer.GetUmbracoIndexer(ProfilingLogger, luceneDir, ScopeProvider.SqlContext, options: new UmbracoContentIndexerOptions(true, false, null)))
|
||||
using (var indexer = IndexInitializer.GetUmbracoIndexer(ProfilingLogger, luceneDir, ScopeProvider.SqlContext,
|
||||
//include unpublished content since this uses the 'internal' indexer, it's up to the media cache to filter
|
||||
options: new UmbracoContentIndexerOptions(true, false, null)))
|
||||
using (indexer.ProcessNonAsync())
|
||||
{
|
||||
indexer.RebuildIndex();
|
||||
@@ -151,7 +153,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
Assert.IsNotNull(publishedMedia);
|
||||
|
||||
//move item to recycle bin
|
||||
var newXml = XElement.Parse(@"<node id='3113' version='5b3e46ab-3e37-4cfa-ab70-014234b5bd33' parentID='-21' level='1' writerID='0' nodeType='1032' template='0' sortOrder='2' createDate='2010-05-19T17:32:46' updateDate='2010-05-19T17:32:46' nodeName='Another Umbraco Image' urlName='acnestressscrub' writerName='Administrator' nodeTypeAlias='Image' path='-1,-21,3113'>
|
||||
var newXml = XElement.Parse(@"<node id='3113' key='5b3e46ab-3e37-4cfa-ab70-014234b5bd33' parentID='-21' level='1' writerID='0' nodeType='1032' template='0' sortOrder='2' createDate='2010-05-19T17:32:46' updateDate='2010-05-19T17:32:46' nodeName='Another Umbraco Image' urlName='acnestressscrub' writerName='Administrator' nodeTypeAlias='Image' path='-1,-21,3113'>
|
||||
<data alias='umbracoFile'><![CDATA[/media/1234/blah.pdf]]></data>
|
||||
<data alias='umbracoWidth'>115</data>
|
||||
<data alias='umbracoHeight'>268</data>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<HintPath>..\packages\Castle.Core.4.1.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Examine, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Examine.1.0.0-beta024\lib\net45\Examine.dll</HintPath>
|
||||
<HintPath>..\packages\Examine.1.0.0-beta025\lib\net45\Examine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<packages>
|
||||
<package id="AutoMapper" version="6.1.1" targetFramework="net461" />
|
||||
<package id="Castle.Core" version="4.1.1" targetFramework="net461" />
|
||||
<package id="Examine" version="1.0.0-beta024" targetFramework="net461" />
|
||||
<package id="Examine" version="1.0.0-beta025" targetFramework="net461" />
|
||||
<package id="LightInject" version="5.0.3" targetFramework="net461" />
|
||||
<package id="LightInject.Annotation" version="1.1.0" targetFramework="net461" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net461" />
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<HintPath>..\packages\ClientDependency.1.9.6\lib\net45\ClientDependency.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Examine, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Examine.1.0.0-beta024\lib\net45\Examine.dll</HintPath>
|
||||
<HintPath>..\packages\Examine.1.0.0-beta025\lib\net45\Examine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageProcessor.Web, Version=4.8.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageProcessor.Web.4.8.4\lib\net45\ImageProcessor.Web.dll</HintPath>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<package id="ClientDependency" version="1.9.6" targetFramework="net461" />
|
||||
<package id="ClientDependency-Mvc5" version="1.8.0.0" targetFramework="net461" />
|
||||
<package id="CSharpTest.Net.Collections" version="14.906.1403.1082" targetFramework="net461" />
|
||||
<package id="Examine" version="1.0.0-beta024" targetFramework="net461" />
|
||||
<package id="Examine" version="1.0.0-beta025" targetFramework="net461" />
|
||||
<package id="ImageProcessor" version="2.5.4" targetFramework="net461" />
|
||||
<package id="ImageProcessor.Web" version="4.8.4" targetFramework="net461" />
|
||||
<package id="ImageProcessor.Web.Config" version="2.3.0.0" targetFramework="net461" />
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<PackageReference Include="ClientDependency" Version="1.9.6" />
|
||||
<PackageReference Include="CSharpTest.Net.Collections" Version="14.906.1403.1082" />
|
||||
<PackageReference Include="dotless" Version="1.5.2" />
|
||||
<PackageReference Include="Examine" Version="1.0.0-beta024" />
|
||||
<PackageReference Include="Examine" Version="1.0.0-beta025" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.5.1" />
|
||||
<PackageReference Include="LightInject" Version="5.0.3" />
|
||||
<PackageReference Include="LightInject.Annotation" Version="1.1.0" />
|
||||
|
||||
Reference in New Issue
Block a user