Skip to content

required attribute set id filter on attribute group repository getList #11936

@tzyganu

Description

@tzyganu

Preconditions

  1. Magento 2.1 or 2.2 (probably reproducible on earlier versions)

Steps to reproduce

  1. Try calling Magento\Eav\Model\Attribute\GroupRepository::getList with a \Magento\Framework\Api\SearchCriteriaInterface parameter that does not contain a filter for attribute_set_id

Expected result

  1. I Should get as response the list of attribute groups based on my search criteria

Actual result

  1. I get a Magento\Framework\Exception\NoSuchEntityException with the message No such entity with %fieldName = %fieldValue.

Additional info:

Full description and code can be found here https://magento.stackexchange.com/q/195740/146

The exception happens because the getList method of the GroupRepository requires a filter on attribute_set_id: https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Eav/Model/Attribute/GroupRepository.php#L120-L128
I don't really see the need for this. The repository should let me retrieve the groups as I want to.

If I'm wrong, please explain the reason, if I'm right, just tell me and I'll come back with a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions