Console icon indicating copy to clipboard operation
Console copied to clipboard

Get-ItemField command ignores the -Language parameter

Open Krusen opened this issue 6 years ago • 0 comments

Expected Behavior

The Get-ItemField command should respect the -Language parameter and return fields for all specified langues.

Actual Behavior

The command ignores the -Language parameter by setting the Language property to null and returns only fields for current item language.

https://github.com/SitecorePowerShell/Console/blame/master/Cognifide.PowerShell/Commandlets/Data/GetItemFieldCommand.cs#L38

Steps to Reproduce the Problem

N/A

Proposed Solution

I think just removing the line Language = null; would fix this and I don't see how this could cause any issues, but I haven't tested it.

If the command is not supposed to support the -Language parameter then the documentation should be updated and the command could just extend BaseLanguageAgnosticItemCommand instead of BaseItemCommand as all it does is add language support.

Krusen avatar Jun 14 '18 13:06 Krusen