Console
Console copied to clipboard
Get-ItemField command ignores the -Language parameter
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.