Marketing companies not sending e-mails

Hello, all.

We successfully use marketing companies and send e-mails. A couple of days ago, marketing companies stopped sending e-mails. We looked at the logs and found the following errors:


[Error retrieving template for the email campaign. template_id = 9f0d0646-1bf4-3da9-500a-5ad6dcec5796

[:error] [pid 1441] [client 10.1.29.145:55554] PHP Warning:  Illegal string offset 'cookie_name' in /var/www/crm/cache/smarty/templates_c/%%E2^E2B^E2BC33C5%%SubPanelTiles.tpl
.php on line 41, referer: https://crm.***.ru/index.php?action=WizardMarketing&module=Campaigns&return_module=Campaigns&return_action=WizardHome&return_id=5326ce95-f3ca-5cd3-0eed-5afe601de523&campaign_i
d=5326ce95-f3ca-5cd3-0eed-5afe601de523&jump=3&show_wizard_marketing=1&marketing_id=4f667952-6968-9cbf-67c5-5afe61d27ced&record=4f667952-6968-9cbf-67c5-5afe61d27ced&campaign_type=Email

[:error] [pid 1441] [client 10.1.29.145:55554] PHP Notice:  Undefined index: type in /var/www/crm/include/SubPanel/SubPanel.php on line 450, referer: https://crm.***.ru.r
u/index.php?module=Campaigns&action=TrackDetailView&record=5326ce95-f3ca-5cd3-0eed-5afe601de523

We create the company with the help of a wizard. And during the year there were no problems.

We tried to do a “Quick Repair and Rebuild”, created new templates and used old templates, but the result is the same - sending emails does not work.

We use the version of SuiteCRM 7.7.4.

Has anyone encountered such a case?
I will be grateful for any advice and help.

If additional information is required, please let me know.

Thank you.

I think you mean “marketing campaigns” and not “marketing companies”, right?

Some of the errors you show might not be the most relevant to the problem. But the one about the email template seems to be.

So I would just try re-doing the template, it might have become corrupt for some reason.

Hello, pgr. Thank you for the feedback.

Yes. Quite right. Sorry for my english… :wink:

We have already tried to create new templates, and also tried to send old templates. The result is unsuccessful. We continue to look for solutions

Thank you

Focus on that error

Error retrieving template for the email campaign. template_id = 9f0d0646-1bf4-3da9-500a-5ad6dcec5796

Can you increase log level to DEBUG, and get more text around that error?

Can you try going in the database with phpMyAdmin and fetching that template with a SELECT? Does it give any error?

Hi, pgr. Thank you for your attention.

Yes, we did. As a result, no errors

Thanks for the advice. We tried and got the error log. We do not see the concrete reason. I hope you can help us :slight_smile:


Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][INFO] Query Execution
Time:0.00059890747070312
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][DEBUG] Hook called:
EmailTemplates::before_retrieve
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][DEBUG] Retrieve
EmailTemplate : SELECT email_templates.* FROM email_templates  WHERE
email_templates.id = '9f0d0646-1bf4-3da9-500a-5ad6dcec5796' AND
email_templates.deleted=0
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][DEBUG] Limit Query:SELECT
email_templates.* FROM email_templates  WHERE email_templates.id =
'9f0d0646-1bf4-3da9-500a-5ad6dcec5796' AND email_templates.deleted=0
Start: 0 count: 1
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][INFO] Query:SELECT
email_templates.* FROM email_templates  WHERE email_templates.id =
'9f0d0646-1bf4-3da9-500a-5ad6dcec5796' AND email_templates.deleted=0
LIMIT 0,1
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][INFO] Query Execution
Time:0.00057196617126465
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][DEBUG] Hook called:
EmailMarketing::after_retrieve
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][DEBUG] Hook called:
EmailTemplates::before_retrieve
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][DEBUG] Retrieve
EmailTemplate : SELECT email_templates.* FROM email_templates  WHERE
email_templates.id = '9f0d0646-1bf4-3da9-500a-5ad6dcec5796' AND
email_templates.deleted=0
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][DEBUG] Limit Query:SELECT
email_templates.* FROM email_templates  WHERE email_templates.id =
'9f0d0646-1bf4-3da9-500a-5ad6dcec5796' AND email_templates.deleted=0
Start: 0 count: 1
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][INFO] Query:SELECT
email_templates.* FROM email_templates  WHERE email_templates.id =
'9f0d0646-1bf4-3da9-500a-5ad6dcec5796' AND email_templates.deleted=0
LIMIT 0,1
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][INFO] Query Execution
Time:0.00026488304138184
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][FATAL] Error retrieving
template for the email campaign. template_id =
9f0d0646-1bf4-3da9-500a-5ad6dcec5796
Fri May 18 23:20:02 2018
[29855][7b9af6e9-8c60-3883-433a-59673772c91b][FATAL] Error verifying
templates for the campaign, exiting

Thank you

So this query runs without errors in phpMyAdmin?

SELECT
email_templates.* FROM email_templates  WHERE email_templates.id =
'9f0d0646-1bf4-3da9-500a-5ad6dcec5796' AND email_templates.deleted=0
LIMIT 0,1

If the database is not giving an error, can you check if there are any PHP errors in your Web server log (often called php_errors.log or errors.log)

I repeated the sending with a new template in order to be sure that
there is the template.
I got the same error with a new template ID:

In the crm log:
[23270][7b9af6e9-8c60-3883-433a-59673772c91b][INFO] Query:SELECT
email_templates.* FROM email_templates WHERE email_templates.id =
‘a22b00fe-8034-a6d4-105b-5afaee6469df’ AND email_templates.deleted=0
LIMIT 0,1
Mon May 21 14:30:04 2018
[23270][7b9af6e9-8c60-3883-433a-59673772c91b][INFO] Query Execution
Time:0.00015497207641602
Mon May 21 14:30:04 2018
[23270][7b9af6e9-8c60-3883-433a-59673772c91b][FATAL] Error retrieving
template for the email campaign. template_id =
a22b00fe-8034-a6d4-105b-5afaee6469df
Mon May 21 14:30:04 2018
[23270][7b9af6e9-8c60-3883-433a-59673772c91b][FATAL] Error verifying
templates for the campaign, exiting

For the
SELECT
email_templates.* FROM email_templates WHERE email_templates.id =
‘a22b00fe-8034-a6d4-105b-5afaee6469df’ AND email_templates.deleted=0
LIMIT 0,1

PhpMyAdmin says:
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0006
sec)

php error log is empty.

But in the module “Email template” we see this template, but with the different ID
= ‘e663fdef-e58d-9a1f-7761-5b02ac8c64ce’

Before sending mailing the template changes ID?

This looks like a bug, but…

  • it’s a very old version, which makes it much more difficult for me to test, or to track any fixes that have been applied in Github since that release

  • I can’t explain why it was working before and now it isn’t… did you upgrade something? Or install an add-on? Or deploy some customization?

1 Like

That’s it.
The mailings worked fine until a certain time (Tuesday, May 15). Since October 2017.
We have never made any customization or changes in the module “Marketing campaigns”.
On our other versions of SuiteCRM 7.7.4. this module works correctly and at the moment.

Thank you

Good day,

We want to try the idea.

We want to manually assign the correct template ID to the database for the mass mailing. Where exactly in the database is the place for the template ID at the time of sending the mailing?

Thank you

I don’t know, but these things are not too hard to find by searching the database tables with phpMyAdmin.

Tables like


campaigns
prospect_list_campaigns
email_marketing
email_marketing_prospect_lists
email_templates
etc...

Remember in the database “Targets” are called “Prospects” for historical reasons.