warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\drupal\Rotafix-Online\modules\ubercart\uc_store\uc_store.module on line 2762.

Drupal also many components not compatible with 6.6

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Island Usurper’s picture

Status: Active » Postponed (maintainer needs more info)

Is 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?

cwhitcoe’s picture

I 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.

webchick’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
690 bytes

I get the error in #2 when I visit admin/store/products without any products defined.

I suggest a fix something like this patch.

Island Usurper’s picture

FileSize
769 bytes

theme_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().

webchick’s picture

Status: Needs review » Needs work

That 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.

Island Usurper’s picture

FileSize
811 bytes

Ah, I forgot a layer. Things are complicated when you have forms and tables in one data array.

webchick’s picture

Status: Needs work » Reviewed & tested by the community

Yep, that did it! Thanks. :)

Island Usurper’s picture

Status: Reviewed & tested by the community » Fixed

Huzzah!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

rickmanelius’s picture

Version: 6.x-2.x-dev » 7.x-3.0
Status: Closed (fixed) » Active

Reopened 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

longwave’s picture

Component: Website » Orders
Status: Active » Fixed
rickmanelius’s picture

Much appreciated @longwave!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.