Using version 6.x-1.0-rc5 I'm getting the following warning when checking out:
warning: Invalid argument supplied for foreach() in /var/www/vhosts/xxxxxxxx/sites/all/modules/uc_signup/uc_signup.module on line 601.
I do not have any fields configured in /admin/user/profile.
I'm telling Ubercart to send user account information to new users, and to unblock them, but BOTH of these are failing. Perhaps this is related?
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 585656.patch | 2.71 KB | ezra-g |
Comments
Comment #1
gregglesI think this might also happen if people have fields but none of them are shown on the registration page. I kind of think we should remove the dependency on profile module if it's at all possible.
Comment #2
agileadamAccount information is being sent to the user successfully. Also, the user is created as active. These were, in fact, both working prior to adding two signup fields (see below).
Also, after adding First Name and Last Name signup fields, there is no warning message when completing a checkout.
Comment #3
ezra-g commentedgreggles is indeed correct here. We should make the core profile module optional, probably as part of an implementation that would also support content profile (#527700: Optional Content Profile support, and make core profile optional as well).
As for the user accounts being blocked, that is a separate issue. After checking a development site where this is in use it seems that the user accounts are defaulting to blocked even when it is functioning correctly. Not a good default.
Comment #4
ezra-g commentedActually, after further investigation, users are not created as blocked by default -- That would have happened in earlier versions of uc_signup, when we used user_save instead of drupal_execute to create the new accounts. If the accounts are being created, with the latest version of uc_signup, I would expect that they would be active regardless of these foreach errors. Can you specify which version of uc_signup you're using?
Comment #5
ezra-g commentedComment #6
ezra-g commentedClosing due to lack of response.
Comment #7
puneet63 commentedI am also running with the same issue with uc_signup 6.x-1.0-beta4 version.
In my case I am not taking any optional content profile parameter.But after completing the order it shows the following Error:
" warning: Invalid argument supplied for foreach() in ../sites/all/modules/ubercart/uc_signup/uc_signup.module on line 601. "
Modules & Versions used:
signup - 6.x.1.0-rc6
ubercart- 6.x.2.2
drupal - 6.15
I need it as the earliest.
Thanks in advance
Comment #8
greggles@puneet - do you have the profile module enabled with at least one field?
Comment #9
puneet63 commentedHi Greg Thanks for responding
Yes we have profile module enabled but we do not added any field because we just want to take email of the attendees.
So Is there any way to fix it without having field on profile module?
Comment #10
puneet63 commentedStill Looking for response
Comment #11
ezra-g commenteduc_signup doesn't currently support not having profile fields. For more about how it could support them, please see #623900: API for additions to attendee info form.
Comment #12
gregglesPerhaps in the interim uc_signup could have a hook_requirements implementation that requires profile fields with the proper settings (i.e. a field that is visible on the registration form, right?). This would at least make sure people have their sites configured properly.
Comment #13
ezra-g commentedYes, this seems like a good idea. At the very least, we should probably avoid these invalid arg foreach errors.
Comment #14
lyricnz commentedWhy is invalid to have no profile fields? Especially if using content_profile.
Comment #15
ezra-g commentedUC_Signup doesn't support content_profile. Currently the checkout workflow is optimized to use profile fields, but could be modified to skip a checkout phase if you were using it to only check out the current user.
Here's a patch for a hook_requirements implementation.
Comment #16
ezra-g commentedThis is now committed.