Hi
I made my first address field, intended to use for billing address in a node specified as a nodeprofile (in case that's relevant).
I get this error:

warning: Invalid argument supplied for foreach() in [path]/includes/form.inc on line 948.

Can someone help me with this?
Thanks,
Scott

Comments

rconstantine’s picture

Again (from the other post), a devel backtrace would be helpful as it will point directly to the function in my module that caused this.

rconstantine’s picture

Well, you're in luck. I happened upon this in one of my installations. Seems I neglected to add an 'Activeselect'-free option for one of the config settings. In other words, since you don't have the 'Activeselect' module installed, you're getting this error.

So either install it (which activates all drop-down AJAXy goodness anyway), or wait until I update the module with an if...else to account for it. Strictly speaking, the module is not supposed to depend on Activeselect, but rather, it is an option for added functionality.

OOPS!

rconstantine’s picture

Ahah! I simply forgot one line. Just after line 443 (if my copy still looks enough like the released version at this point), hit enter and put this on the next line: '#options' => $all_countries,

Silly me. Will roll a new release soon.

rconstantine’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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

ycwjjjj’s picture

Status: Closed (fixed) » Active

Sorry, I am using 5.x-2.4, I still got this error and can't find the way to solve it out. Could someone help for it? Thanks.
The error is.

warning: Invalid argument supplied for foreach() in /home/www.xxx.com/sites/all/modules/cck_address/country_select/country_select.module on line 484.
warning: Invalid argument supplied for foreach() in /home/www.xxx.com/sites/all/modules/cck_address/country_select/country_select.module on line 484.
NewZeal’s picture

This is a different error from a different module. Try downloading the module again in full (which includes all the country/province data). Your error indicates that this may not have happened correctly.