Hi gents
I found a bug in the event module. When sending out an invitation by email and in the template in the subject is a variable (ie. personal invitation for {XYZ}). the variable isnât replaced.
So I did a bit of research and found the bug in the code in âmodules/FP_Events/controller.phpâ in line
427 (for contacts):
$email_subject = $emailTemp->parse_template_bean($emailTemp->subject, âFP_eventsâ, $event);
484 (for prospects):
$email_subject = $emailTemp->parse_template_bean($emailTemp->subject, âFP_eventsâ, $event);
540 (for leads):
$email_subject = $emailTemp->parse_template_bean($emailTemp->subject, âFP_eventsâ, $event);
The issue is, that parsing the subject template is not working with the bean_name of âFP_eventsâ. So I copied the fix from the lines above and parsed the variables first through âContactsâ and then again as intended.
Here the code:
Contacts:
$firstpass_subj = $emailTemp->parse_template_bean($emailTemp->subject, âContactsâ, $contact);
$email_subject = $emailTemp->parse_template_bean($firstpass_subj, âFP_eventsâ, $event);
Prospects:
$firstpass_subj = $emailTemp->parse_template_bean($emailTemp->subject, âContactsâ, $target);
$email_subject = $emailTemp->parse_template_bean($firstpass_subj, âFP_eventsâ, $event);
Leads:
$firstpass_subj = $emailTemp->parse_template_bean($emailTemp->subject, âContactsâ, $lead);
$email_subject = $emailTemp->parse_template_bean($firstpass_subj, âFP_eventsâ, $event);
It works like a charm now. Since I have no account on github, would someon be so nice, to upload it there?
Cheers,
Carsten