Forums

Connecting ChronoForms to jNews problem

newbandon 09 Jan, 2011
I have been through most of the forum looking for Acajoom/jNews issues and how-tos. This process is straightforward and makes complete sense, but many of my fields are not getting passed to jNews. I'm hoping someone has some input.

First, I'm using CF 3.2 (also tried 3.1RC5) and jNews Pro 5.1.2 (also tried 4.1.2).

Utilizing the CURL plugin:
- Under the General tab I set my form "name" field to equal "name" (the jNews/Acajoom field) and "email" to equal "email"
- In the Extra Fields box I put "listid=17" and "receive_html=1" on two separate lines.
- Under the CURL Params tab, I set the Target URL to "index.php?option=com_jnewsletter&act=subscribe&" (also tried without trailing "&" symbol).

When the form is processed a user does indeed get created in jNews, but only the email field is passed. The listid, name, and receive_html items are ignored. I have confirmed with the Joobi documentation that the the jNews subscription URL is the same as Acajoom (in this case: index.php?option=com_jnewsletter&act=subscribe&name=$name&email=$email&listid=17&receive_html=1).

So in addition to the CURL plugin, I also tried setting the On Submit Code to the following:
<?php
    $name = JRequest::getVar('name', '', 'post');
    $email = JRequest::getVar('email', '', 'post');
    $MyForm->setFormData('redirecturl', "index.php?option=com_jnewsletter&act=subscribe&name=$name&email=$email&listid=17&receive_html=1;
    ?>


This produces the exact same results; a user is created but only the email address field is translated to jNews. I'm pretty sure I have confirmed that my variables/field names are correct (there's only two; hard to mess up).

Any input is appreciated.
GreyHead 09 Jan, 2011
Hi newbandon,

I've just downloaded a copy of JNews, I'll install it and check.

The ReDirect URL you have there looks fine to me. I don't know why that isn't working.

There's a possible problem with the cURL version having part of the query string in the Target URL. You could try leaving index.php in the Target URL and moving
option=com_jnewsletter
act=subscribe
to the Extra Fields box. (Though I think I had it working the other way when I wrote the example for the book.)

Bob
GreyHead 11 Jan, 2011
Hi newbandon,

There are a few more fields required. I've installed the latest free version and from the module I can see that there are the following inputs used in their subscription form.
The form action is index.php?option=com_jnewsletter but we’ll move the query string part into the CURL setup leaving http://www.example.com/index.php as the Target URL (note that this must be a full url, index.php is not enough).

The three user inputs are: name, email and receive_html

The fixed values from the hidden inputs are
subscribed[1]=1
sub_list_id[1]=17
acc_level[1]=0
act=subscribe
listname=1
passwordA=FdI6FpE5S.m9g
fromSubscribe=1
Note: your values may be a little different.

You can see the CURL plug-in settings I used in the image below. This all seems to work OK and my subscriptions are registered in jNews.

Bob

PS
newbandon 14 Jan, 2011
Thank you for the thorough description. Of course, my external form password is different (for anyone browsing this post, that's found under jNews>Configuration>Subscribers), but I don't know what some of the other fields you list are (acc_level, fromSubscribe, & listname, for example, don't seem to be necessary per Joobi instructions).

Unfortunately, I seem to get almost the same response using your code as mine: the name field is not sent to jNews (email field works great) and the user is subscribed to all lists, not just the one specified (in this case, list 17). Any other thoughts?
GreyHead 14 Jan, 2011
Hi newabandon,

You are correct, the extra inputs may not be required, I just coped them from the JNews subscription module. If the form works without them that is fine.

I only have one list set up on the test site, I'll check with a second one and see if I get the same problem.

The name is being transferred OK for me, maybe an input name mismatch somewhere?

Bob
GreyHead 14 Jan, 2011
Hi newabandon,

I checked with a second list and my new user only gets subscribed to the one specified.

The cURL plug-in doesn't handle array values well so I would expect a problem if your form allowed subscription to multiple lists.

Bob

PS Tested using jNews GPL 5.0.3
newbandon 27 Jan, 2011
I'm happy to report the resolution to this issue so that others might benefit here.

Of course, there is nothing wrong the the ChronoForms CURL plugin. :wink:

The issue whereby the name is not transferred to jNews and lists are incorrectly selected has to do if VirtueMart is also installed on the site (this specifically relates to jNews Pro 5.1.2 with Virtuemart 1.1.x). The solution is simple for those who do not need jNews/VM integration: disable the jNews/Virtuemart plugin. When that is done, not only with ChronoForms CURL plugin work precisely, but all of the jNews modules will also perform as designed on the site. 😀

Thanks again for all the clarification you've provided in this thread, Greyhead! Hopefully it will help others.
riga75 25 Nov, 2011
Sorry to intrude, but I read the post and I have a problem to integrate and chronoform JNews.
The "section" is different from the curl schrennshot I see in this thread
Thanks for the hel
GreyHead 25 Nov, 2011
Hi riga75,

Your post seems to have stopped suddenly . . .

My screenshot here was from ChronoForms v3. In v4 the setup is ismilar except that all the entries are in the box - the dynamic ones use curly brackets like name={name}

Bob
riga75 25 Nov, 2011
I tried it and I put this data
option = com_jnews
act = subscribe
name = {CognomeNome} 
email = {email}
password = xxxxxxx
fromSubscribe = 1
listid = 15
receive_html = 1

But it does not work😟
GreyHead 25 Nov, 2011
Hi riga75,

That should be OK - except that I think you need to remove the spaces:
option=com_jnews
act=subscribe
name={CognomeNome}
email={email}
password=xxxxxxx
fromSubscribe=1
listid=15
receive_html=1

What do you see with the Debugger action?

Bob
riga75 25 Nov, 2011
Excuse my ignorance but how do I enable debugging?
riga75 25 Nov, 2011
I tried it and gives me these values​​:

CURL OK : the CURL function was found on this server.
$curl_values:
curl_target_url: http:// www . mysite . it/index.php

redirect_url

redirect_url_target_url: http:// www . mysite . it/email-inviata-home.html
Redirect URL: http:// www . mysite . it/email-inviata-home.html



What does it mean?
thanks
GreyHead 25 Nov, 2011
Hi riga75,

It looks as though the cURL values are still empty.

Please check the first line I left the spaces in option=com_jnews

Bob
riga75 25 Nov, 2011
See the screenshot, thanks
[attachment=0]Mobili TreGima - Amministrazione.jpg[/attachment]
This topic is locked and no more replies can be posted.