Open
Description
Preconditions and environment
- Magento version 2.4.6-p2
Steps to reproduce
- Create any attribute, with a default label
- Set a different label for store id = X
- load attribute on admin area, and dump
$attribute->getStoreLabel(X)
Expected result
Store label is dumped
Actual result
Default label is dumped
Additional information
The problem is quite obvious when watching the first method lines :
magento2/app/code/Magento/Eav/Model/Entity/Attribute.php
Lines 490 to 495 in 3cc15fb
A fix could be :
if (null === $storeId && $this->hasData('store_label')) {
instead of if ($this->hasData('store_label')) {
But it's probably a bit more complicated than that, we probably want to use default value if store label is empty or not set
Workaround : $attribute->unsetData('store_label')->getStoreLabel($storeId);
Release note
No response
Triage and priority
- 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
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Activity