You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending out an email invitation through the Event module in SuiteCRM, the subject line does not correctly replace the variable placeholder (e.g., {XYZ}). The template engine fails to parse the placeholder, leaving it as-is in the email subject. This issue occurs in the FP_Events module, specifically in the code responsible for email subject parsing.
Expected Behavior:
The variable in the email subject should be replaced correctly when the invitation is sent, such as replacing {XYZ} with the actual value (e.g., contact name, event details, etc.).
Actual Behavior:
The email subject retains the variable placeholder as-is (e.g., Personal invitation for {XYZ}) instead of replacing it with the actual value.
Issue
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
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.
1. Go to the Events module and create or edit an event.
2. In the email template, include a variable in the subject line (e.g., Personal invitation for {XYZ}).
3. Send an invitation to a contact, lead, or prospect.
4. Check the received email. The variable placeholder {XYZ} does not get replaced with the corresponding value.
### Version
8.7
### What browser are you currently using?
Chrome
### Browser Version
Version 131.0
### Environment Information
PHP 8.2
### Operating System and Version
Ubuntu 22.04
The text was updated successfully, but these errors were encountered:
shubham-pawar
changed the title
Event invitation doesn’t parse variables in the subject
Bug in Event Module: Email Subject Variables Not Being Replaced in Invitations
Jan 28, 2025
Description
When sending out an email invitation through the Event module in SuiteCRM, the subject line does not correctly replace the variable placeholder (e.g., {XYZ}). The template engine fails to parse the placeholder, leaving it as-is in the email subject. This issue occurs in the FP_Events module, specifically in the code responsible for email subject parsing.
Expected Behavior:
The variable in the email subject should be replaced correctly when the invitation is sent, such as replacing {XYZ} with the actual value (e.g., contact name, event details, etc.).
Actual Behavior:
The email subject retains the variable placeholder as-is (e.g., Personal invitation for {XYZ}) instead of replacing it with the actual value.
Issue
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);
Possible Fix
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:
Prospects:
Leads:
Steps to Reproduce the Issue
The text was updated successfully, but these errors were encountered: