Skip to content

Get-ItemField command should not define the -Language parameter #1016

@Krusen

Description

@Krusen

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.

Metadata

Metadata

Assignees

Labels

area-commandsInvolves functions and cmdlets.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions