9 years ago
2
Topic

Hi everyone

Please also see reply underneath for an update of the whole situation.

bump, up

I have a SEBLOD form running that is storing sign-up information in the database and also sends a confirmation e-mail to the person signing up for the course. You can find an example here: http://test2.schifferliwebdesign.ch/cfm/kursdaten/kursauschreibungen/15-801.html


I placed an AfterStore Event (from the Code Pack Plugin) in the form to also subscribe the E-Mailadress to AcyMailing.
For this i followed the reccomended code from this topic: http://www.acyba.com/forum/4-general-talk-about-acymailing/69238-seblod-and-acymailing.html


When I submit the form now, everything gets stored correctly in the database. The E-Mail gets send, the sender get's subscribed to acyMailing.

However, instead of returning the thank you message, the page turns blank and returns:


#anmeldung_kursauswahl# IS A FIELD#anmeldung_vorname# IS A FIELD#anmeldung_name# IS A FIELD

These are three fields that I use in my form and e-mail. But they are not the same three fields. They are also not the fields used for acyMailing subscription. So I have no idea why those three fields are printed here, and frankly, I'm a bit at a loss where to start looking for the error.

So maybe someone has an idea or has encountered this beforehand?
Any help is greatly appreciated!

many thanks
Michael

Get a VIP membership
9 years ago
0
Level 1

I have further tried to get this working, but to no avail. When I turn on error reporting, I get the following results after submitting the form:

#anmeldung_kursauswahl# IS A FIELD#anmeldung_vorname# IS A FIELD#anmeldung_name# IS A FIELD
Notice: Undefined index: _ in /home/www/web287/html/swebdesign/test2/cfm/libraries/cck/base/form/store_inc.php on line 178

Fatal error: Cannot use object of type cpanelClass as array in /home/www/web287/html/swebdesign/test2/cfm/components/com_cck/controller.php on line 366

If I remove the AfterStore Plugin from the form, everything works fine. So I guess the problem is there.
Also, the Code used in the AFterStore Plugin works, i.e. the customer gets subscribed to acymailing.Here is the code used:

require_once(JPATH_ADMINISTRATOR.'/components/com_acymailing/helpers/helper.php');
$myUser = new stdClass();
$myUser->email = strip_tags(JRequest::getString('anmeldung_email')); //Please replace email_field by your own field name (the name of the field "email").
$myUser->name = strip_tags(JRequest::getString('anmeldung_name')); //Please replace name_field by your own field name (the name of the field "name").
$subscriberClass = acymailing_get('class.subscriber');

$subid = $subscriberClass->save($myUser);


$subscriberClass->sendConf($subid); //we send the confirmation email... only if needed based on the current user status and the option from the Acy configuration page.

$subscribe = array(2); //Specify here the ID of your lists separated by a comma, in this example the user will be subscribed to lists IDs 3,4 and 5.

$newSubscription = array();
if(!empty($subscribe)){
foreach($subscribe as $listId){
$newList = array();
$newList['status'] = 1;
$newSubscription[$listId] = $newList;
}
}
$subscriberClass->saveSubscription($subid,$newSubscription);

You can also find a live version of the form with joomla and seblod debuggin turned on here:

http://test2.schifferliwebdesign.ch/cfm/kursdaten/kursauschreibungen/15-806.html

Any help would be greatly appreciated!

9 years ago
0
Level 1

bumping this up. I'd really appreciate some feedback on that fatal error problem...

Get a VIP membership