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

#7412: Verified and added several Cloning overrides in many drivers #7592

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

MatteoPiovanelli-Laser
Copy link
Contributor

@MatteoPiovanelli-Laser MatteoPiovanelli-Laser commented Mar 1, 2017

Fixes #7412

I am not sure all the overrides are correct even here.
I added the Cloning override in some of the drivers that did not have it as well.

@@ -177,5 +177,11 @@ public class AutoroutePartDriver : ContentPartDriver<AutoroutePart> {
context.Element(part.PartDefinition.Name).SetAttributeValue("UseCulturePattern", part.Record.UseCulturePattern);
context.Element(part.PartDefinition.Name).SetAttributeValue("PromoteToHomePage", part.PromoteToHomePage);
}

protected override void Cloning(AutoroutePart originalPart, AutoroutePart clonePart, CloneContentContext context) {
clonePart.CustomPattern = originalPart.CustomPattern;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the actual slug? If so it should be altered.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. That would be the DisplayAlias property.

@sebastienros
Copy link
Member

Looks good but we need someone to confirm it works.

/cc summoning @BenedekFarkas

@BenedekFarkas
Copy link
Member

I'll be happy to do testing on this and the related PRs, but won't be able to do so in the next few days. I'll add myself as a reviewer just in case, so it shows up for me on GitHub.

…Cleanup

# Conflicts:
#	src/Orchard.Web/Core/Contents/Views/Parts.Contents.Publish.SummaryAdmin.cshtml
#	src/Orchard.Web/Modules/Orchard.MediaLibrary/Drivers/AudioPartDriver.cs
#	src/Orchard.Web/Modules/Orchard.MediaLibrary/Drivers/DocumentPartDriver.cs
#	src/Orchard.Web/Modules/Orchard.MediaLibrary/Drivers/MediaPartDriver.cs
#	src/Orchard.Web/Modules/Orchard.MediaLibrary/Drivers/OEmbedPartDriver.cs
@BenedekFarkas BenedekFarkas changed the title Verified and added several Cloning overrides in many drivers #7412: Verified and added several Cloning overrides in many drivers Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verify Cloning method implementation for parts/fields
6 participants