Your software
My Mautic version is: 4.4.1
My PHP version is: 7.4.29
My Database type and version is: 10.3.34-MariaDB-0ubuntu0.20.04.1
Your problem
My problem is:
Dynamic content is not being replaced.
Email (using classic-editor and personalized theme based on the blank-theme):
Dynamic Content:
Email is sent from a campaign to my test segment.
On email client the email is looking like this - nothing was replaced:
These errors are showing in the log:
[2022-11-12 17:30:52] mautic.NOTICE: PHP Notice - Trying to access array offset on value of type bool - in file /var/www/html/m/app/bundles/CoreBundle/Controller/ExceptionController.php - at line 111 {"request":"[object] (Symfony\\Component\\HttpFoundation\\Request: GET ///remote/fgt_lang?lang=/../../../..//////////dev/ HTTP/1.1\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate\r\nConnection: keep-alive\r\nHost: 88.99.225.124\r\nUser-Agent: python-requests/2.6.0 CPython/2.7.5 Linux/3.10.0-1160.el7.x86_64\r\nX-Php-Ob-Level: 1\r\n\r\n)","exception":"[object] (Symfony\\Component\\Debug\\Exception\\FlattenException: {})","logger":null,"class":"Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException","currentContent":"","layout":"Error","code":404,"anonymous":true,"baseTemplate":"MauticCoreBundle:Default:slim.html.php","templatePage":false,"template":"MauticCoreBundle:Error:404.html.php","templating":"[object] (Symfony\\Bundle\\FrameworkBundle\\Templating\\DelegatingEngine: {})","statusText":"Not Found","url":"///remote/fgt_lang?lang=/../../../..//////////dev/","urlParts":false} {"hostname":"ubuntu-2gb-nbg1-1","pid":1588665}
[2022-11-12 17:40:39] mautic.NOTICE: PHP Notice - Trying to access array offset on value of type bool - in file /var/www/html/m/app/bundles/PageBundle/Entity/HitRepository.php - at line 267 {"options":{"leadId":"903","0":"https://ionutojica.com/%","second_to_last":"4192"},"sq":"[object] (Doctrine\\DBAL\\Query\\QueryBuilder: SELECT h.date_hit latest_hit FROM page_hits h WHERE (h.lead_id = 903) AND (h.id <> 4192))","result":false} {"hostname":"ubuntu-2gb-nbg1-1","pid":1597483}
[2022-11-12 17:41:44] mautic.NOTICE: PHP Notice - Trying to access array offset on value of type bool - in file /var/www/html/m/app/bundles/PageBundle/Entity/HitRepository.php - at line 267 {"options":{"leadId":"904","0":"https://ionutojica.com/%","second_to_last":"4194"},"sq":"[object] (Doctrine\\DBAL\\Query\\QueryBuilder: SELECT h.date_hit latest_hit FROM page_hits h WHERE (h.lead_id = 904) AND (h.id <> 4194))","result":false} {"hostname":"ubuntu-2gb-nbg1-1","pid":1592632}
Steps I have tried to fix the problem:
- as shown above, tried with all sort of short_code
- search on mautic forum and found unsolved issues, based on V2, V3, and V4.1 :
2021 V4, but not the type of dynamic content I would like: Send Mail with Dynamic Content on Contact Screen does not work
2021 V3, but used in code-mode, which I do not use: Dynamic content at Code Mode in Emails - how?
2020 V2: Dynamic Content in Email Issues
2018: Dynamic content placeholder in email is not replaced
-
would it be, that I can use the dynamic content ID-number (in my case: 4) ? I will try it also
-
updating to 4.4.4 would help?
I just saw this BUG closed in April 2022: Multiple areas of Mautic throw a 500 error · Issue #9762 · mautic/mautic · GitHub . So I will try to update mautic.
Later edit: I updated to 4.4.4 => no improvement. I suppose I do not use the dynamic content correctly… -
found a good description of dynamic content functionality here: Content Personalisation in Mautic - Tutorial on Mautic Dynamic Content | Droptica . But still not working.
I am thankful for any advice. I would be open to try find out by myself inside the code, what the error could be, but I would need some direction, in which file should I search…
Regards,
Ionut