Console
Console copied to clipboard
Add-ItemLanguage issue with fallback languages
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'
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
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?