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

Avoid cloning the AutoroutePart pattern in the localized content #15810

Merged
merged 25 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a491b55
Avoid cloning the AutoPart pattern in the localized content
hishamco Apr 23, 2024
77d190b
Merge branch 'main' into hishamco/issue-15805
hishamco May 1, 2024
4e8b6cb
Address feedback
hishamco May 1, 2024
9abfd72
Merge branch 'main' into hishamco/issue-15805
hishamco May 1, 2024
96a224d
Merge branch 'main' into hishamco/issue-15805
hishamco May 2, 2024
69793d2
Apply suggestions from code review
hishamco May 2, 2024
143ec74
Merge branch 'main' into hishamco/issue-15805
hishamco May 2, 2024
2f6f73b
Move AutorouteContentLocalizationHandler to Autoroute module
hishamco May 2, 2024
11280d1
Address feedback
hishamco May 2, 2024
62cc6b1
Merge branch 'main' into hishamco/issue-15805
hishamco May 2, 2024
c05564f
Merge branch 'main' into hishamco/issue-15805
hishamco Jun 4, 2024
3c33271
Merge branch 'main' into hishamco/issue-15805
MikeAlhayek Jun 5, 2024
af0ab20
Merge branch 'main' into hishamco/issue-15805
hishamco Jun 6, 2024
cd4662e
Merge branch 'main' into hishamco/issue-15805
hishamco Jun 6, 2024
7965e24
Merge branch 'main' into hishamco/issue-15805
hishamco Jun 17, 2024
bd997d0
Fix the build
hishamco Jun 17, 2024
6246634
Don't use Alert<TPart>()
hishamco Jun 17, 2024
0703ec2
Merge branch 'main' into hishamco/issue-15805
hishamco Oct 14, 2024
9f06ec2
Merge branch 'main' into hishamco/issue-15805
hishamco Dec 10, 2024
2211d17
Update Startup.cs
gvkries Jan 24, 2025
ac7ebda
Merge branch 'main' into hishamco/issue-15805
gvkries Jan 24, 2025
7721fe5
Apply suggestions from code review
hishamco Jan 25, 2025
8c0fee5
Merge branch 'main' into hishamco/issue-15805
hishamco Jan 25, 2025
03c7a7d
Merge branch 'main' into hishamco/issue-15805
hishamco Jan 25, 2025
d61194f
Update src/OrchardCore.Modules/OrchardCore.Autoroute/Startup.cs
hishamco Jan 25, 2025
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 @@ -4,6 +4,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Localization;
using Microsoft.Extensions.Logging;
using OrchardCore.Autoroute.Models;
using OrchardCore.ContentLocalization.Handlers;
using OrchardCore.ContentLocalization.Models;
using OrchardCore.ContentLocalization.Records;
Expand Down Expand Up @@ -102,6 +103,12 @@ public async Task<ContentItem> LocalizeAsync(ContentItem content, string targetC
clonedPart.LocalizationSet = localizationPart.LocalizationSet;
clonedPart.Apply();

// Clearing the autopart path to regenerate the permalink automatically
if (cloned.Has<AutoroutePart>())
{
cloned.Content.AutoroutePart.Path = null;
}
Piedone marked this conversation as resolved.
Show resolved Hide resolved

var context = new LocalizationContentContext(cloned, content, localizationPart.LocalizationSet, targetCulture);

await Handlers.InvokeAsync((handler, context) => handler.LocalizingAsync(context), context, _logger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<ItemGroup>
<ProjectReference Include="..\..\OrchardCore\OrchardCore.Admin.Abstractions\OrchardCore.Admin.Abstractions.csproj" />
<ProjectReference Include="..\..\OrchardCore\OrchardCore.Apis.GraphQL.Abstractions\OrchardCore.Apis.GraphQL.Abstractions.csproj" />
<ProjectReference Include="..\..\OrchardCore\OrchardCore.Autoroute.Core\OrchardCore.Autoroute.Core.csproj" />
<ProjectReference Include="..\..\OrchardCore\OrchardCore.ContentLocalization.Abstractions\OrchardCore.ContentLocalization.Abstractions.csproj" />
<ProjectReference Include="..\..\OrchardCore\OrchardCore.ContentManagement.Abstractions\OrchardCore.ContentManagement.Abstractions.csproj" />
<ProjectReference Include="..\..\OrchardCore\OrchardCore.ContentManagement.GraphQL\OrchardCore.ContentManagement.GraphQL.csproj" />
Expand Down