v7.11.1 - Campaign email variables fail: [ERROR] Unable to find relationship emails_email_templates

Campaign email variables ($contact_firs_name etc.) are not populated. Test emails are successfully delivered. Bounced email are successfully processed.

New upgrade to v7.11.1 and PHP Version 7.2.15 and ubuntu0.18.04.1

The only error that gets logged is below. Connected or coincidence?

Thu Feb 14 12:51:11 2019 [11916][1][ERROR] Unable to find relationship emails_email_templates
Thu Feb 14 12:51:11 2019 [11916][1][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From-name is not set.
From name is not set.
codes:1, 7, 10

Since this is an upgrade, I suggest removing and re-adding email accounts to try and get rid of those log messages.

The code to replace variables has been touched in this release, to fix bugs. It is possible that some other new bug was introduced, but I havenā€™t seen others complaining, and this was tested specifically before release.

Please try my suggestion and then keep me updated on this. Thanks.

@PGR, which ā€œemail accountsā€? Just the outgoing? Or both outgoing and incoming, including the bounce handling?

If I remove the bounce handling account, will that affect existing campaigns which are still using it?

Problem is worse now. I removed all email accounts (inbound and outbound) then created a new SMTP outbound account. Email wonā€™t send now.

Also, even when I delete ALL email accounts, iI can still see the old Outbound account in my Profile >> Email Settings >> ā€œOutgoing SMTP Mail Serversā€

That shouldnā€™t be there, right?

Remember that Accounts are set both in individual userā€™s accounts, and in Admin / Outbound Email and Admin / Inbound Email.

When I get confused about configurations I always find it helpful to track things directly from the database, tables inbound_email and outbound_email

Having the same problem with 7.11.2 - email variables are not populating in campaign emails.

This is a clean install of 7.11.2
Apache Version 2.4.38
PHP Version 7.2.15
MySQL Version 10.1.38-MariaDB

I created an email template with variables and sent it to a seed target list and the variables are blank in the sent e-mail:


Subject: , Tracking Variables for SuiteCRM
Message-ID: <EtXQT59mf1Eo3OTA28maZ2kyqWsATgX6fU7GyWETA@crm.regcfinvesting.com>
X-Mailer: PHPMailer 6.0.6 (https://github.com/PHPMailer/PHPMailer)
X-CampTrackID: dfb294f1-2062-c814-d43c-5c71574f487e
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="b1_EtXQT59mf1Eo3OTA28maZ2kyqWsATgX6fU7GyWETA"

--b1_EtXQT59mf1Eo3OTA28maZ2kyqWsATgX6fU7GyWETA
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Tracking Variables

- First Name:=20
- Last Name:=20
- Full Name:=20


To remove yourself from this email list go to https://crm.regcfinvesting.co=
m/index.php?entryPoint=3Dremoveme&identifier=3Ddfb294f1-2062-c814-d43c-5c71=
574f487e

@scott, thereā€™s another thread on the same issue, link below. I will attempt to create an issue in Github early next week. As far as I can see, the devs think they have fixed this new problem (email variable used to work fine for me, back in 7.10.7) but they havenā€™t. It seems it works for some and not for others.

Try this link: https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/17861-email-template-insert-variable

@stephenmchugh: Thanks for following up and for creating an issue for this when you get a chance. Hopefully they can release an update with a fix soon. This functionality is pretty critical to CRM.

Cheers,
Scott

Agreed, this is core functionality. I didnā€™t need to create a new issue. Iā€™ve updated an existing issue in Github (issue link below) but the devs closed it back in January, presumably because they think theyā€™ve fixed it! I guess you and I are living proof they are mistaken :wink:

Iā€™ve asked @pgr how to get it re-opened. Stand by for an answer.

https://github.com/salesagility/SuiteCRM/issues/6535

@scott, the issue on Github has been re-opened. Itā€™s labeled as High Priority so fingers crossedā€¦

1 Like

@stephenmchugh - thanks for the update! Fingers crossed, indeed!

I really want to be able to shift more of my email marketing to Suite and this is definitely an impediment. I actually tried switching my PHP version down to 7.1 and then upgraded to 7.3 just to see if it was a weird PHP issue, but the problem persists regardless.

Cheers,

Scott

I donā€™t get it. Perhaps @PGR or someone from Sales Agility could comment? We are seriously considering moving to the Sales Agility hosted service but my problem is that no-one seems concerned that this key functionality doesnā€™t work. I can only assume that no-one is using SuiteCRM for e-mail marketing because lead variables donā€™t work! If that assumption is correct, are there other issues I donā€™t about?

@scottā€¦ did you see this thread? !!!

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/20469-email-template-variables-are-not-getting-replaced-by-their-values-in-suitecrm-7-10-7#79337

1 Like

@stephenmchugh - My problem with the target list variables is occurring on a clean 7.11.x install, and those changes already appear to be there, so unfortunately I donā€™t see a fix there. Did you try doing something with that, and did it work?

No, Target and Lead variables not working here (7.11.3) for Campaigns which is frustrating because itā€™s key functionality for any CRM. Double the frustration because it used to work fine back in the early days of 7.10

However, Contact variables DO work. I can only confirm that last name and first name for a Contact work, as they are the only two I tested.

I havenā€™t tested variables in one-off emails but I understand from other threads that they are borked too.

Rgds

ā€˜Angry from Manchesterā€™ :stuck_out_tongue:

I got Lead variables to work!!! Props to ā€˜sru001ā€™ on Github, post https://github.com/salesagility/SuiteCRM/issues/6535)

It seems so obvious now:

lead_first_name: $lead_first_name

lead_last_name: $lead_last_name

lead_name: $lead_name

BTW, note that Target variables still use the old ā€œprospects.ā€ naming:

Target first name: $prospect_first_name

Target last name: $prospect_last_name

Target name: $prospect_name

etc.

etc.

@stephenmchugh Thanks, tried to find a quick fix but itā€™s over my head. I expect it to miss a bean identification pass through based on the to send to lead/contact/target.

Hope a fix is found swiftly. Then we can modify all templates again _/

We have a mix of Contacts and Leads for our campaigns, so our quick fix for a personalized email looks like this:

ā€œHi $lead_first_name$contact_first_name, yada yadaā€¦ā€

(note that you donā€™t need a space between ā€˜$lead_first_nameā€™ and ā€˜$contact_first_nameā€™)

Works fine.

Was the issue for Cross Variable names in Email Templates resolved?
In an Email Template to Contact, some details from Lead are being pulled but Email Templates are only able to Translate Information for a Single Bean (module)

issue logged at https://github.com/salesagility/SuiteCRM/issues/8840