Closed
Description
Preconditions (*)
on magento 2.4 a product attribute code with attribute_code of value A_12345678_9123_4567_890a_BCDEF123456 is saved through the admin ui but not from the repository. Here Magento\Eav\Model\Entity\Attribute::ATTRIBUTE_CODE_MAX_LENGTH should be respected.
Steps to reproduce (*)
Here is a code example:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$ar = $objectManager->create('Magento\Catalog\Api\ProductAttributeRepositoryInterface');
$attf = $objectManager->create('\Magento\Catalog\Api\Data\ProductAttributeInterfaceFactory');
$a = $attf->create();
$a->setData(['attribute_code' => 'A_12345678_9123_4567_890a_BCDEF123456','frontend_label' => 'a test', 'frontend_input' => 'text']);
$ar->save($a);
Magento/Framework/Exception/InputException with message 'Invalid value of "A_12345678_9123_4567_890a_BCDEF123456" provided for the attribute_code field.'
Expected result (*)
- attribute is saved
Actual result (*)
- validator exception
Addiotional information
Issue is reproducible via WebApi
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentMay be fixed according to the position in the backlog.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchAffects non-critical data or functionality and does not force users to employ a workaround.
Type
Projects
Status
Done