Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade of XbyK API to v29.5.2 #258

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Kentico.Xperience.UMT" Version="1.7.0" />
<PackageReference Include="Kentico.Xperience.UMT" Version="1.7.1" />
<PackageReference Include="MediatR" Version="12.4.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion KVA/Migration.Toolkit.Source/Services/MediaFileMigrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ private async Task RequireMigratedMediaFiles(List<(IMediaLibrary sourceLibrary,
{
foreach (var (ksMediaLibrary, ksSite, targetMediaLibrary) in migratedMediaLibraries)
{
bool loadMediaFileData = false;
string? sourceMediaLibraryPath = AssetFacade.GetMediaLibraryAbsolutePath(toolkitConfiguration, ksSite, ksMediaLibrary, modelFacade);
bool loadMediaFileData = !string.IsNullOrWhiteSpace(sourceMediaLibraryPath);
var ksMediaFiles = modelFacade.SelectWhere<IMediaFile>("FileLibraryID = @FileLibraryId", new SqlParameter("FileLibraryId", ksMediaLibrary.LibraryID));

foreach (var ksMediaFile in ksMediaFiles)
Expand Down
3 changes: 0 additions & 3 deletions Migration.Toolkit.CLI/Migration.Toolkit.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="appsettings.local.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
11 changes: 7 additions & 4 deletions Migration.Toolkit.Common/Helpers/MediaLinkService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,14 @@ public MatchMediaLinkResult MatchMediaLink(string? linkStr, int currentSiteId)
// match site sub path
if (site != default && uri is not null)
{
var siteLiveSiteUri = new Uri(site.siteLiveSiteUrl, UriKind.Absolute);
int subPathLength = siteLiveSiteUri.LocalPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries).Length;
if (uri.LocalPath.StartsWith(siteLiveSiteUri.LocalPath, StringComparison.InvariantCultureIgnoreCase))
if (Uri.IsWellFormedUriString(site.siteLiveSiteUrl, UriKind.Absolute))
{
inspectionIndex += subPathLength;
var siteLiveSiteUri = new Uri(site.siteLiveSiteUrl, UriKind.Absolute);
int subPathLength = siteLiveSiteUri.LocalPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries).Length;
if (uri.LocalPath.StartsWith(siteLiveSiteUri.LocalPath, StringComparison.InvariantCultureIgnoreCase))
{
inspectionIndex += subPathLength;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion Migration.Toolkit.Common/Migration.Toolkit.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<ItemGroup>
<PackageReference Include="HtmlAgilityPack.NetCore" Version="1.5.0.1" />
<PackageReference Include="Kentico.Xperience.UMT" Version="1.7.0" />
<PackageReference Include="Kentico.Xperience.UMT" Version="1.7.1" />
<PackageReference Include="MediatR" Version="12.4.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0"/>
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Kentico.Xperience.UMT" Version="1.7.0" />
<PackageReference Include="Kentico.Xperience.UMT" Version="1.7.1" />
<PackageReference Include="MediatR" Version="12.4.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Migration.Toolkit.KXP.Api/Migration.Toolkit.KXP.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Kentico.Xperience.Admin" Version="29.5.1" />
<PackageReference Include="Kentico.Xperience.Core" Version="29.5.1" />
<PackageReference Include="Kentico.Xperience.Admin" Version="29.5.2" />
<PackageReference Include="Kentico.Xperience.Core" Version="29.5.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Kentico.Xperience.Core" Version="29.5.1" />
<PackageReference Include="Kentico.Xperience.WebApp" Version="29.5.1" />
<PackageReference Include="Kentico.Xperience.Core" Version="29.5.2" />
<PackageReference Include="Kentico.Xperience.WebApp" Version="29.5.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0"/>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5"/>
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Migration.Toolkit.Tests/MediaHelperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public void ParseMediaLinkDirectPath()
(2, "Site2", "http://localhost:5002/SiteSubPath"), // site with custom global dir & subpath
(3, "Site3", "http://localhost:5003"), // site without custom global media library dir
(4, "Site4", "http://localhost:5004"), // site with custom global media library dir & without media sites folder
// add site with live site url "localhost" - that was valid in K11
],
[
// (null, null), not set globally
Expand Down
2 changes: 1 addition & 1 deletion Migration.Toolkit.Tests/Migration.Toolkit.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.1" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Loading