This project is read-only.

Troubles with multiple content item identities

Topics: Troubleshooting
Oct 13, 2014 at 12:38 AM
Edited Oct 13, 2014 at 12:40 AM
I'm observing some strange behavior in 1.8.1 when importing my content. I've been using "Identifier" from IdentityPart to create import id relations so I can update my content through reimporting it. What I noticed is that "Identifier" gets completely ignored (it won't match ID to existing records, just create new records with each import), if Content Item has "AutoroutePart" attached, then it permits you to use "/alias" as the only identifier ...

I'd expect it to allow me to use either or even both as all identities are included in the export, but only one is considered during import, I don't even know what is deciding factor for "alias" taking priority over "identifier", making me believe it's a bug. Any thoughts?
Oct 14, 2014 at 9:01 PM
Found the cause of Identifier from the IdentityPart not working correctly when AutoroutePart is also used, in the AutoroutePartHandler.cs
// Register alias as identity
OnGetContentItemMetadata<AutoroutePart>((ctx, part) => {
    if (part.DisplayAlias != null)
        ctx.Metadata.Identity.Add("alias", part.DisplayAlias);
If i delete this I can't use alias anymore, but Identifier from IdentityPart starts working again. Is there a way to make both Identifier from IdentityPart and Alias from AutoroutePart working together?