Closed (fixed)
Project:
Ubercart
Version:
7.x-3.0
Component:
Orders
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2008 at 22:40 UTC
Updated:
14 Jul 2012 at 19:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
Island Usurper commentedIs this on the /products page? There have been several updates to the code since then, so is this still a problem? Is the problem that there aren't any product nodes?
Comment #2
cwhitcoe commentedI also get a similar errror:
warning: Invalid argument supplied for foreach() in /home/public_html/vivapura/sites/all/modules/ubercart/uc_store/uc_store.module on line 2778.
Comment #3
webchickI get the error in #2 when I visit admin/store/products without any products defined.
I suggest a fix something like this patch.
Comment #4
Island Usurper commentedtheme_tapir_table() is used for more than just the product lists, so that's not a good place to put the message.
Here's a new patch to go into the function that is responsible for building the data passed to theme_tapir_table().
Comment #5
webchickThat does solve the issue (no more big scary red error), but does not display "No products available." I'm not sure why. $table['rows'] is indeed empty.
Comment #6
Island Usurper commentedAh, I forgot a layer. Things are complicated when you have forms and tables in one data array.
Comment #7
webchickYep, that did it! Thanks. :)
Comment #8
Island Usurper commentedHuzzah!
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
rickmanelius commentedReopened for D7.
Warning: Invalid argument supplied for foreach() in theme_tapir_table()
You can see this by visiting and order page admin/store/orders/30376
Comment #11
longwaveFix committed: http://drupalcode.org/project/ubercart.git/commitdiff/56d30ed
Comment #12
rickmanelius commentedMuch appreciated @longwave!