-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: CatalogFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Cannot ReproduceCannot reproduce the issue on the latest `2.4-develop` branchCannot reproduce the issue on the latest `2.4-develop` branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report
Description
Preconditions
- Magento CE 2.1.1 with sample data (Luma theme).
Steps to reproduce
- Navigate to the backend.
- Go to Stores -> Attributes -> Product
- Click on the Add New Attribute button
- Set "Catalog Input Type for Store Owner" = Yes/No, set "Visible on Catalog Pages on Storefront" = Yes, and fill other required fields.
- Click Save Attribute button
- Go to Products -> Catalog. Click on some product that is visible on storefront.
- Find the newly created attribute field and fill it with Yes or No value. Save product.
- Clean cache and reindex:
$ bin/magento cache:clean
$ bin/magento indexer:reindex
- Open a storefront product page.
Actual result
The More Information tab doesn't contain our newly created attribute.
Expected result
The More Information tab contains our newly created attribute.
Additional information
If I make some yes/no attribute visible on frontend, it doesn't appear in the More Information tab on a product details page. I debugged it and found that this relates to the fact that translated string are wrapped into the Phrase object: https://community.magento.com/t5/Magento-2-Feature-Requests-and/function-returns-Phrase-object-Could-this-return-string/idi-p/45075
Particularly, it's \Magento\Catalog\Block\Product\View\Attributes::getAdditionalData() - it requires $value to be string to be added to the $data array. In case of Yes/No attributes $value is an object of \Magento\Framework\Phrase.
Metadata
Metadata
Assignees
Labels
Component: CatalogFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Cannot ReproduceCannot reproduce the issue on the latest `2.4-develop` branchCannot reproduce the issue on the latest `2.4-develop` branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report