Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute category_ids issue #11341

Closed
AmastyLtd-zz opened this issue Oct 10, 2017 · 5 comments
Closed

Attribute category_ids issue #11341

AmastyLtd-zz opened this issue Oct 10, 2017 · 5 comments
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@AmastyLtd-zz
Copy link

AmastyLtd-zz commented Oct 10, 2017

Preconditions

  1. Magento 2.2.0 EE.
  2. PHP 7.0

Steps to reproduce

  1. Enable developer mode.
  2. Go to Admin->Stores->Attributes->Product (https://screen.amasty.com/1507615065816.png)
  3. Find attribute category_ids
  4. Go to Storefront Properties in this attribute
  5. Enable Visible on Catalog Pages on Storefront https://screen.amasty.com/1507615274284.png
  6. Go to product page on front and take this https://screen.amasty.com/1507615245856.png

Expected result

Category ids not visible on the front because users are not interested in knowing id categories.

Actual result:

1 exception(s):
Exception #0 (Exception): Notice: Array to string conversion in /var/www/sources/shagoiko/ee220/app/code/Magento/Catalog/Block/Product/View/Attributes.php on line 88

Exception #0 (Exception): Notice: Array to string conversion in /var/www/sources/shagoiko/ee220/app/code/Magento/Catalog/Block/Product/View/Attributes.php on line 88
#0 /var/www/sources/shagoiko/ee220/app/code/Magento/Catalog/Block/Product/View/Attributes.php(88): Magento\Framework\App\ErrorHandler->handler(8, 'Array to string...', '/var/www/source...', 88, Array)
#1 /var/www/sources/shagoiko/ee220/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml(19): Magento\Catalog\Block\Product\View\Attributes->getAdditionalData()
#2 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/TemplateEngine/Php.php(59): include('/var/www/source...')
#3 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Product\View\Attributes), '/var/www/source...', Array)
#4 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/var/www/source...')
#5 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#6 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#7 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('product.attribu...')
#8 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('product.attribu...')
#9 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('product.attribu...')
#10 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('product.attribu...', true)
#11 /var/www/sources/shagoiko/ee220/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml(16): Magento\Framework\View\Layout\Interceptor->renderElement('product.attribu...')
#12 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/TemplateEngine/Php.php(59): include('/var/www/source...')
#13 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Product\View\Description), '/var/www/source...', Array)
#14 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/var/www/source...')
#15 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#16 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#17 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('product.info.de...')
#18 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('product.info.de...')
#19 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('product.info.de...')
#20 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('product.info.de...', true)
#21 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('product.info.de...')
#22 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('content')
#23 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('content')
#24 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content')
#25 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('content', true)
#26 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('content')
#27 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('main')
#28 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main')
#29 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main')
#30 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main', true)
#31 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('main')
#32 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('columns')
#33 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('columns')
#34 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns')
#35 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('columns', true)
#36 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('columns')
#37 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('main.content')
#38 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main.content')
#39 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content')
#40 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main.content', true)
#41 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('main.content')
#42 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('page.wrapper')
#43 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#44 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#45 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', true)
#46 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper')
#47 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('root')
#48 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#49 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#50 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#51 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Layout.php(954): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#52 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#53 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#54 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}()
#55 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#56 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Result/Page.php(257): Magento\Framework\View\Layout\Interceptor->getOutput()
#57 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/View/Result/Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#58 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#59 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#60 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#61 /var/www/sources/shagoiko/ee220/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#62 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#63 /var/www/sources/shagoiko/ee220/lib/internal/Magento/Framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#64 /var/www/sources/shagoiko/ee220/index.php(41): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#65 {main}

Reason:

We are debbuging and find that in \Magento\Catalog\Block\Product\View\Attributes::getAdditionalData not provided array value of the attribute (https://screen.amasty.com/1507556183855.png).

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 10, 2017
@orlangur
Copy link
Contributor

Enable Visible on Catalog Pages on Storefront

Expected result
Category ids not visible on the front

This is clearly store misconfiguration and not a bug. E_NOTICE will not be displayed to end user.

@orlangur
Copy link
Contributor

@magento-engcom-team please provide some reasoning when reopening issue.

This case can be covered in https://github.com/magento/magento2/pull/10619/files, just that expected behavior is not so clear in described store setup. Should any is_array($value) be treated as $value = ''?

@ishakhsuvarov
Copy link
Contributor

@orlangur While E_NOTICE is not displayed to the end user it still should be eliminated

@AmastyLtd-zz AmastyLtd-zz changed the title Attribute category_ids fatal Attribute category_ids issue Oct 11, 2017
@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Oct 11, 2017
@magento-engcom-team
Copy link
Contributor

@AmastyLtd, thank you for your report.
We've created internal ticket(s) MAGETWO-81575 to track progress on the issue.

@okorshenko
Copy link
Contributor

The issue has been fixed and delivered to 2.2-develop branch. Will be available with upcoming patch release

@okorshenko okorshenko added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

5 participants