I installed the module and got the following error:

warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/entreco/sites/all/modules/vr/vr.module on line 469.

It seems to be for the registration because when I deactivate it the error goes away.

Comments

jbomb’s picture

Title: warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/entreco/sites/all/modules/vr/vr.module on line 469 » warning: Invalid argument supplied for foreach() ... vr.module on line 469
Assigned: Unassigned » jbomb
Status: Active » Postponed (maintainer needs more info)

Thanks for the report!

Please describe which VR modules you have installed, and exactly what you are doing or which page displays this error. It would also be helpful if you included any relevant watchdog log messages.

Please also confirm that you have an API compatible VR account, the process for which is described in the "Getting Started" section of the VerticalResponse module.

Chokti’s picture

Sorry, I overlooked this response and opened another ticket.

I have installed all VR modules.

The error message appeared on installation and then again under managing mailing lists.

I have not even input the id and pw for the account yet because it belongs to a third party who has not sent it yet.

What do you mean by "relevant watchdog log messages"?

Thanks

jbomb’s picture

Title: warning: Invalid argument supplied for foreach() ... vr.module on line 469 » Invalid argument supplied for foreach() errors when VerticalResponse module is unconfigured.
Status: Postponed (maintainer needs more info) » Active

Thank you for the follow up. Now it is clear to me why you are receiving the message, and it is because the credentials have not been provided. I will roll a patch to prevent the vr module from calling the API when invalid credentials are provided or when no credentials are provided. Until then you are better off leaving the module disabled until the credentials are provided by this third party.

I do want to be clear that the VerticalResponse account *must* be compatible with the VerticalResponse API. That is to say that the API is not available for VerticalResponse accounts by default. The easiest way to obtain an API compatible account is to create a new one through the VerticalResponse Drupal Integration portal. Mailing lists can then be imported from the existing VerticalResponse account.

Alternatively, existing accounts can be transferred to an API compatible account by following the instructions in the "getting started" section of the VerticalResponse for Drupal project page, but this process may take longer to complete.

[edit]

#780176: warning: Invalid argument supplied for foreach() in /vr/vr.module on line 469 has been marked as duplicate.

Chokti’s picture

Thanks for the clarification. I look forward to getting the patch.

Chokti’s picture

I have done you suggested: disabled and then re-enabled the modules once I have the ID and PW. Unfortunately, I still get same line error when I use either menu item under manage mail.

Create List from Segmentation Query
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/entreco/sites/all/modules/vr/vr.module on line 469.
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/entreco/sites/all/modules/vr/vr.module on line 469.

(yes twice)

Manage Mailing List Visibility
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/entreco/sites/all/modules/vr/vr.module on line 469.

Any other help you may be able to provide is appreciated. Thanks.

jbomb’s picture

Line 469 of vr.module is expecting an array of lists from the VerticalResponse API. The API method should return an empty array if no lists exist within the VerticalResponse account.

If I had to guess, I would say that the VerticalResponse account is not configured correctly. I suggest visiting the watchdog log at "/admin/reports/dblog" and filtering for messages of the type "VerticalResponse."

[edit]

Please post any VR entries from the logs that correspond to this error.

Chokti’s picture

Status: Active » Closed (fixed)