[Skip to main content](#vessel-content)

#   Error when running report in v2.0

##

- **[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")**
- [![fandomfest's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11599-fandomfest "View fandomfest's Profile") Topic Author
- [ Offline](/forum/user/11599-fandomfest)

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 9 months ago -  13 years 9 months ago [\#84466](#84466) by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")  *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#84466 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")* was created by *[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")*

I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.

> Warning: Invalid argument supplied for foreach() in /home/dev/public\_html/administrator/components/com\_hikashop/classes/widget.php on line 1222

How can I fix this?

[ ![hika-error.png](/forum/attachment/7858) ](/forum/attachment/7858 "hika-error.png")

- [ ![hika-error.png](/forum/attachment/7858) ](/forum/attachment/7858 "hika-error.png") [ ](/forum/attachment/7858?download=1 "hika-error.png")

Last edit: 13 years 9 months ago by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 9 months ago [\#84530](#84530) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#84530 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Hi there,

I think it's a bug we just fixed.
Try to replace the widget.php file by the attached one.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")**
- [![fandomfest's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11599-fandomfest "View fandomfest's Profile") Topic Author
- [ Offline](/forum/user/11599-fandomfest)

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 9 months ago [\#85897](#85897) by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")  Replied by *[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#85897 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Sorry for the late reply. I just uploaded the revised widget.php and now I'm getting an error on a different line.

[ ![error.png](/forum/attachment/8002) ](/forum/attachment/8002 "error.png")

- [ ![error.png](/forum/attachment/8002) ](/forum/attachment/8002 "error.png") [ ](/forum/attachment/8002?download=1 "error.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 9 months ago [\#85954](#85954) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#85954 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Hi there,

Could you please look at every widget separately to find from which widget it comes from.
You can also try to re-save the configuration of this widget.
If it doesn't work, I'll need an access to your backend as well as an FTP access to find the source of the issue ![:)](/media/kunena/emoticons/3.png ":)").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")**
- [![fandomfest's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11599-fandomfest "View fandomfest's Profile") Topic Author
- [ Offline](/forum/user/11599-fandomfest)

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 9 months ago [\#86293](#86293) by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")  Replied by *[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#86293 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Are plugins the same as widgets?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 9 months ago [\#86335](#86335) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#86335 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Which plugins are you talking about?
What I need you to do is just click on the edit button next to the widget titles and see if the error is in still in the edition page.
So I'll know which widget cause the error.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")**
- [![fandomfest's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11599-fandomfest "View fandomfest's Profile") Topic Author
- [ Offline](/forum/user/11599-fandomfest)

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 9 months ago -  13 years 9 months ago [\#86456](#86456) by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")  Replied by *[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#86456 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Okay I understand now. I was a little confused about what a widget was. The errors are both coming from custom reports I created. Here are the settings:

[ ![Screen&#95;shot&#95;2013-01-21&#95;at&#95;3&#95;08&#95;45&#95;PM&#95;2013-01-21.png](/forum/attachment/8083) ](/forum/attachment/8083 "...2013-01-21.png")

- [ ![Screen&#95;shot&#95;2013-01-21&#95;at&#95;3&#95;08&#95;45&#95;PM&#95;2013-01-21.png](/forum/attachment/8083) ](/forum/attachment/8083 "...2013-01-21.png") [ ](/forum/attachment/8083?download=1 "...2013-01-21.png")

Last edit: 13 years 9 months ago by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 9 months ago [\#86510](#86510) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#86510 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Indeed it's a small bug. You have to edit the file widget.php in administrator/components/com_hikashop/classes and replace these lines:
Code:

foreach($elements as $element){ if(!isset($typeTable[$element-&gt;type])){ $typeTable[$element-&gt;type]=$element-&gt;type; } }

by these:
Code:

if(!empty($elements)){ foreach($elements as $element){ if(!isset($typeTable[$element-&gt;type])){ $typeTable[$element-&gt;type]=$element-&gt;type; } } }

By the way, filtering by product on that kind of report is useless since the line of customers just show the number of new customers. Those who just registered.
So filter by product is meaningless.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")**
- [![fandomfest's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11599-fandomfest "View fandomfest's Profile") Topic Author
- [ Offline](/forum/user/11599-fandomfest)

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 9 months ago -  13 years 9 months ago [\#86560](#86560) by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")  Replied by *[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#86560 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Getting error on another page now. It is custom as well.

[ ](http://www.hikashop.com/media/kunena/attachments/11599/hika.png) [ ![hika.png](/forum/attachment/8103) ](/forum/attachment/8103 "hika.png")

- [ ![hika.png](/forum/attachment/8103) ](/forum/attachment/8103 "hika.png") [ ](/forum/attachment/8103?download=1 "hika.png")

Last edit: 13 years 9 months ago by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 9 months ago -  13 years 9 months ago [\#86562](#86562) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#86562 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

I guess the best fix to do is to replace this: Code:

if(!empty($elements)){ if(isset($widget-&gt;widget_params-&gt;compares)){ foreach($elements as $element){ if(empty($element-&gt;type)){ $element-&gt;type=JText::_('NOT_SPECIFIED'); } } } }

by this: Code:

if(!empty($elements)){ if(isset($widget-&gt;widget_params-&gt;compares)){ foreach($elements as $element){ if(empty($element-&gt;type)){ $element-&gt;type=JText::_('NOT_SPECIFIED'); } } } }else{ return true; }

in the same file.

Last edit: 13 years 9 months ago by [Eliot](/forum/user/1824-eliot "View Eliot's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")**
- [![fandomfest's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11599-fandomfest "View fandomfest's Profile") Topic Author
- [ Offline](/forum/user/11599-fandomfest)

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 9 months ago [\#86581](#86581) by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")  Replied by *[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#86581 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Now getting this error on the same report as before:

Warning: Invalid argument supplied for foreach() in /home/dev/public_html/administrator/components/com_hikashop/views/dashboard/tmpl/graph.php on line 14

Warning: Invalid argument supplied for foreach() in /home/dev/public_html/administrator/components/com_hikashop/views/dashboard/tmpl/graph.php on line 23

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 9 months ago [\#86900](#86900) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#86900 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Ok you better send me a PM with an FTP and a backend access so I can take a look directly.
These are not big issues, you just get this message because the datas you required are empty and so the graph has nothing to display and generate an error.
I will just fix the code to avoid the error.

The following user(s) said Thank You: [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")**
- [![fandomfest's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11599-fandomfest "View fandomfest's Profile") Topic Author
- [ Offline](/forum/user/11599-fandomfest)

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 9 months ago [\#87060](#87060) by [fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")  Replied by *[fandomfest](/forum/user/11599-fandomfest "View fandomfest's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#87060 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Just sent it. Thanks for looking into it!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 9 months ago [\#87414](#87414) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Error when running report in v2.0](/forum/3-bug-report/77271-error-when-running-report-in-v2-0#87414 "I tried to run a report to see all the customers that purchased a certain product and got this error. Now it is displaying everywhere.  How can I fix this?")*

Thanks for the infos but I also need a backend access to your site to see the effect of my modifications ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI3MS1lcnJvci13aGVuLXJ1bm5pbmctcmVwb3J0LWluLXYyLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.109 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
