Hi,
After the migration. Products are not shown any more on the front page and I get the followin error:
1 exception(s):
Exception #0 (Exception): Notice: Array to string conversion in /data/web/magento2/vendor/magento/module-catalog/Block/Product/View/Attributes.php on line 88
Also every new product made after the import has the same issue
I made a clone of the server before using UB data migration pro.
And there If I make a new product the product is displayed correctly.
So the problem is related to the UB dat migration pro tool.
Can you guys please help me out.
Thanks
8 answers
Hi there,
1 exception(s):
Exception #0 (Exception): Notice: Array to string conversion in /data/web/magento2/vendor/magento/module-catalog/Block/Product/View/Attributes.php on line 88Also every new product made after the import has the same issue
That is strange, kindly provide me the admin credentials, ssh credentials and web root path of your Magento2 instance.
I will check further and reply you more about that.
Regards,
Mall.
Hi there,
I have checked your site at http://new2mag.hypernode.io/ and i see the issue as you mentioned. It happened with both new added products. That is a similar issue like as in this post:
https://magento.stackexchange.com/questions/182800/magento2-error-with-attributes-on-front-end
I have try with workaround as in that post:
Replace the code line 88:
elseif ((string)$value == ”) {
to the code line:
elseif (implode(“”, $value) == ”) {
And the issue was solved: https://prnt.sc/gzfvbs
Where did you download the source code of Magento core ver.2.2.0?
Regards,
Mall.
Hi Thanks,
I See it helps partly.
What you show is my new made product. That has been solved.
That is great as new made products will not have the problem
http://www.24mantest.nl/nlk/amfa4000waterontharder
THis is a simple product there it also fixed.
Only on configurable products it has not been fixed.
http://www.24waisttrainer.com/fr/perfect-body-woman-latexcorset
I hope that can be fixed as well.
Also I will check if a newly created configurable product wil work correct
thanks
Julio
Hi there,
As you see all of that issues are Magento’s core issue with your data. Please answer my question in my reply #3:
Where did you download the source code of Magento core ver.2.2.0?
Only on configurable products it has not been fixed.
http://www.24waisttrainer.com/fr/perfect-body-woman-latexcorset
I hope that can be fixed as well.
You can solve that by similar workaround as my reply #3 for the code line 90 in the php file at path:
vendor/magento/module-catalog/Block/Product/View/Attributes.php
Regards,
Mall.
Hi there,
Only on configurable products it has not been fixed.
http://www.24waisttrainer.com/fr/perfect-body-woman-latexcorset
I hope that can be fixed as well.
I have helped you to check further on that issue, to handle that case i have applied more tweak code in the php file at path:
vendor/magento/module-catalog/Block/Product/View/Attributes.php
I have replaced the code line:
elseif (implode("", $value) == '') {
to the code line:
elseif (is_array($value) && !sizeof($value)) {
And now your configurable product was showing in front-end of your site: https://prnt.sc/gzm89t
Regards,
Mall.
Hi THanks for fixing.
I am using a hypernode.io you can choose to set it up with a preinstalled version of magento2
Hi there,
Hi THanks for fixing.
You are welcome. Lets contact me if you need further assistance.
Regards,
Mall.