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

merge_vars appear broken in 0.009 #8

Open
nigelm opened this issue Jan 30, 2014 · 1 comment
Open

merge_vars appear broken in 0.009 #8

nigelm opened this issue Jan 30, 2014 · 1 comment

Comments

@nigelm
Copy link

nigelm commented Jan 30, 2014

You appear to be still doing the same mangling on merge_vars as was used when the module was using a GET rather than POST method, so the JSON (without URL encoding) looks like:-

{"merge_vars[FNAME]":"Fred",
"output":"json",
"merge_vars[GROUPINGS][0]":{"name":"Roles",
"groups":"Stage Manager,Assistant Stage Manager,Fly,Sound,Follow-spot,Get In/Get Out,Admin,Crew Web"},
"email_address":"[email protected]",
"merge_vars[LNAME]":"Bloggs"}

This is not accepted by Mailchimp which throws an error about missing merge_vars

Removing the merge_vars mangling so that the JSON looks like:-

{"output":"json",
"merge_vars":["FNAME","Fred",
  "LNAME","Bloggs",
  "GROUPINGS",[{"groups":"Stage Manager,Assistant Stage Manager,Fly,Sound,Follow-spot,Get In/Get Out,Admin,Crew Web",
  "name":"Roles"}]],
"email_address":"[email protected]"}"

does not throw an error - although need to test further to make sure its really doing what I expect!

What I have currently tried is removing lines 143 to 154 of the current version (ie the first block of code in _build_query_args

I suspect further simplification to remove the excess arrays (ie the additional [] in GROUPINGS might well work too.

@arcanez
Copy link
Owner

arcanez commented May 27, 2015

do you have a patch for this?

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

2 participants