Console icon indicating copy to clipboard operation
Console copied to clipboard

Add-ItemLanguage issue with fallback languages

Open markgibbons25 opened this issue 3 years ago • 2 comments

Expected Behavior

Calling Add-ItemLanguage -IfExist Skip on an item with language fallback enabled and a language version already existing in the fallback language should not skip - it should add a new version in the specified language.

Actual Behavior

Calling Add-ItemLanguage -IfExist Skip on an item with language fallback enabled and a language version already existing in the fallback language is skipping.

Steps to Reproduce the Problem

SPE 6.2 Sitecore 10.1 Add a language e.g. 'en-us' that falls back to 'en' Add an item in 'en' Call Add-ItemLanguage -IfExist Skip -Language 'en-us'

markgibbons25 avatar Jun 23 '21 04:06 markgibbons25

Perhaps one of these two lines are doing something you don't expect?

https://github.com/SitecorePowerShell/Console/blob/123069575da9a8dbb344d42aa18b00ad6acf4081/src/Spe/Commands/Data/AddItemVersionCommand.cs#L93

https://github.com/SitecorePowerShell/Console/blob/123069575da9a8dbb344d42aa18b00ad6acf4081/src/Spe/Commands/Data/AddItemVersionCommand.cs#L120

michaellwest avatar Jun 24 '21 03:06 michaellwest

Looks correct so yeah not sure what's going on. Oh another bit of info is I had -DoNotCopyFields too, that could be the issue?

markgibbons25 avatar Jun 24 '21 04:06 markgibbons25