AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: llegrand on October 26, 2013, 03:13:01 PM

Title: adding product warnings - after multistore setup ran
Post by: llegrand on October 26, 2013, 03:13:01 PM
I have attempted a multistore - and have a post
http://forum.abantecart.com/index.php/topic,1244.msg4876.html#msg4876 (http://forum.abantecart.com/index.php/topic,1244.msg4876.html#msg4876)
that is awaiting enough guidance to have a success with multistore.

Since adding a mutistore  I am now getting warning on every Product I add. I don't know if these warnings are due to the unsuccesful multistore attempt- or there is another issue.
I have not deleted the additional store while awaiting a reply for getting it setup correctly.

Here's what's in the logs:

2013-10-24 19:20:57 - warning:  AbanteCart core v.1.1.7 array_unique() expects parameter 1 to be array, null given in <b>/home/mmonline/public_html/shop/admin/model/catalog/product.php</b> on line <b>118</b>
2013-10-24 19:20:57 - warning:  AbanteCart core v.1.1.7 Invalid argument supplied for foreach() in <b>/home/mmonline/public_html/shop/admin/model/catalog/product.php</b> on line <b>119</b>
2013-10-26 18:40:18 - warning:  AbanteCart core v.1.1.7 explode() expects parameter 2 to be string, array given in <b>/home/mmonline/public_html/shop/admin/model/catalog/product.php</b> on line <b>113</b>
2013-10-26 18:40:18 - warning:  AbanteCart core v.1.1.7 Invalid argument supplied for foreach() in <b>/home/mmonline/public_html/shop/admin/model/catalog/product.php</b> on line <b>114</b>
2013-10-26 18:40:18 - warning:  AbanteCart core v.1.1.7 array_unique() expects parameter 1 to be array, null given in <b>/home/mmonline/public_html/shop/admin/model/catalog/product.php</b> on line <b>118</b>
2013-10-26 18:40:18 - warning:  AbanteCart core v.1.1.7 Invalid argument supplied for foreach() in <b>/home/mmonline/public_html/shop/admin/model/catalog/product.php</b> on line <b>119</b>



Title: Re: adding product warnings - after multistore setup ran
Post by: abantecart on October 26, 2013, 05:59:42 PM
Thank you for this post. We will check and update.
Title: Re: adding product warnings - after multistore setup ran
Post by: abolabo on October 27, 2013, 12:21:53 PM
please post version of php.
Title: Re: adding product warnings - after multistore setup ran
Post by: llegrand on October 27, 2013, 12:55:18 PM
php is 5.3.26

PS,  don't forget I still haven't gotten the multistore setup correctly yet.  My intuition says that may be causing this issue.
Title: Re: adding product warnings - after multistore setup ran
Post by: abolabo on October 28, 2013, 10:19:28 AM
php is 5.3.26

PS,  don't forget I still haven't gotten the multistore setup correctly yet.  My intuition says that may be causing this issue.

hmm...
it is absolutely illogical mistake that should not be. At least so says php manual. :o

You can try to replace line with          
Code: [Select]
$tags = explode(',', $data['product_tags']);to
Quote
$tags = (array)explode(',', $data['product_tags']);
in your file /admin/model/catalog/product.php

Title: Re: adding product warnings - after multistore setup ran
Post by: llegrand on November 08, 2013, 04:13:36 PM
I have replaced line 113 with the change you suggested.
It now says this: 

$tags = (array)explode(',', $data['product_tags']);

However,  it does not appear to give the error.  I add a new product - and this is the error that occurs AFTER the php replacement.


2013-11-08 20:35:53 - warning:  AbanteCart core v.1.1.7 explode() expects parameter 2 to be string, array given in <b>/home/mmonline/public_html/shop/admin/model/catalog/product.php</b> on line <b>113</b>

Please review and tell me what the correct fix should be.  Also,  do I leave the (array) in the line or remove it?

Thank you

PS,  I have removed the multistore completely, so that should not be an issue any more.
Title: Re: adding product warnings - after multistore setup ran
Post by: abolabo on November 08, 2013, 05:17:29 PM
please do not call warning errors. it's not the same.
Warnings do not stop functionality.
You can just ignore them until new version of abantecart will be released.
Title: Re: adding product warnings - after multistore setup ran
Post by: llegrand on November 08, 2013, 06:06:58 PM
My apologies for misstating the term.  I did title it correctly with "warning"

I will ignore as direct this time.

Do you have an expected release date for 1.1.8?
Title: Re: adding product warnings - after multistore setup ran
Post by: abolabo on November 09, 2013, 03:46:39 PM
we plan release in 2-3 weeks.
But we also need do some improvements.