putyourlightson / craft-campaign

Send and manage email campaigns, contacts and mailing lists in Craft CMS.
https://putyourlightson.com/plugins/campaign
Other
63 stars 25 forks source link

Import fails beceause of not required field not being used #487

Closed joostclevis closed 3 months ago

joostclevis commented 3 months ago

Bug Report

When importing a new list of contacts, there is only one required field (email). There are other fields, but they are not required.

If i import a list it will not import the contacts. In the logs i get the error Fieldname_XXX is invalid. The Fieldname_XXX is a dropdownlist with a couple of options.

Plugin Version

3.4.1

Craft CMS Version

5.2.7

PHP Version

8.2.22

bencroker commented 3 months ago

Can you show me the format you’re using for the dropdown field values? And are all contacts failing to import or just a few specific ones?

joostclevis commented 3 months ago

@bencroker All the contacts fail except the ones that are already in the system and have already chosen an option.

This is the dropdown field:

Screenshot 2024-08-20 at 13 47 48
bencroker commented 3 months ago

The dropdown field doesn't appear to accept a blank string. Does selecting a default option make any difference? If not, then adding a blank value as one of the options should work.

joostclevis commented 3 months ago

@bencroker Adding a deafault selected option or adding a blank option makes the import work.

bencroker commented 3 months ago

Glad to hear that worked!