Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact import from user group fails #7

Closed
jcdarwin opened this issue May 17, 2018 · 3 comments
Closed

Contact import from user group fails #7

jcdarwin opened this issue May 17, 2018 · 3 comments

Comments

@jcdarwin
Copy link

When trying to import contacts from a user group, the task in the Craft admin UI show "Importing CSV file Failed" (even though the import was via a user group, and not a CSV file).

The craft storage/logs/queue.log shows:

2018-05-17 22:26:47 [172.19.0.1][1][-][info][craft\queue\QueueLogBehavior::beforeExec]  [5] Importing CSV file. (attempt: 1) - Started
2018-05-17 22:26:48 [172.19.0.1][1][-][error][craft\queue\QueueLogBehavior::afterError]  [5] Importing CSV file. (attempt: 1) - Error (time: 0.202s): Invalid argument supplied for foreach()

Nothing of consequence in the storage/logs/phperrors.log or storage/logs/web.log

Note that this error is happening when the Campaign (1.1.2) and Campaign Pro (1.1.0) plugins are installed as trials -- would this have anything to do with the error? It's not clear in the plugins what is / isn't allowed in trial mode.

@putyourlightson
Copy link
Collaborator

I can't replicate this on my end. Do you have users in the user group and are you selecting any fields besides the required email field?

Trial mode should allow all functionality so it might be a bug, or at least could use a better error message.

@jcdarwin
Copy link
Author

The problem seems to be that the contacts import failed because I didn't have any custom fields defined in the contact settings. When I defined a single custom field, I could then import all users from the specified user group.

Specifically, the line that errors is the foreach in importRow.

@putyourlightson
Copy link
Collaborator

Thanks, I tracked this bug down and fixed in 9f05819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant