2

We are using CiviCRM 4.6 on a live site we built with WordPress 4.6.1. We ran into the problem explained below. Any help is much appreciated.

I have set up a scheduled reminder to send reminder emails to CiviCRM members 1 month before their membership expires. It works on my local VM and also on WPEngine's staging site. However on the live site on the same WPEngine environment the sent email is empty, no subject line and no body content.

This happens with both SMTP and "Redirect to Database" options in "Settings - Outbound Mail". CiviCRM's SMTP settings are correct and "Save and Send Test Email" works as expected. When redirecting to database, body field is NULL.

I get the following 8 PHP warnings every time a scheduled reminder email goes out. Smarty seems trying to include some missing php files with random names which change every time. Web server has full permissions on /nas/content/live/mysite/wp-content/plugins/files/civicrm/templates_c/en_US. I even renamed this folder and it was re-created. So file permissions on that folder should be OK.

Disabling Smarty in civicrm.settings.php or clearing/disabling cache did not help.

Does anyone have any idea what could be causing this weird problem?

Thanks

[Thu Oct 27 22:07:51.221907 2016] [:error] [pid 1516] [client 208.124.188.134:42618] PHP Warning: include(/nas/content/live/mysite/wp-content/plugins/files/civicrm/templates_c/en_US//%%B8/B82/B82902AF%%14776060711886644419.php): failed to open stream: No such file or directory in /nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1264

[Thu Oct 27 22:07:51.222042 2016] [:error] [pid 1516] [client 208.124.188.134:42618] PHP Warning: include(): Failed opening '/nas/content/live/mysite/wp-content/plugins/files/civicrm/templates_c/en_US//%%B8/B82/B82902AF%%14776060711886644419.php' for inclusion (include_path='/nas/content/live/mysite/wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google:/nas/content/live/mysite/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/packages/:/nas/content/live/mysite/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/:.:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/vendor/tecnickcom:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm//packages:.:/usr/share/php:/usr/share/pear') in /nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1264

[Thu Oct 27 22:07:51.223342 2016] [:error] [pid 1516] [client 208.124.188.134:42618] PHP Warning: include(/nas/content/live/mysite/wp-content/plugins/files/civicrm/templates_c/en_US//%%E1/E1B/E1B25959%%147760607183913258.php): failed to open stream: No such file or directory in /nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1264

[Thu Oct 27 22:07:51.223430 2016] [:error] [pid 1516] [client 208.124.188.134:42618] PHP Warning: include(): Failed opening '/nas/content/live/mysite/wp-content/plugins/files/civicrm/templates_c/en_US//%%E1/E1B/E1B25959%%147760607183913258.php' for inclusion (include_path='/nas/content/live/mysite/wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google:/nas/content/live/mysite/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/packages/:/nas/content/live/mysite/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/:.:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/vendor/tecnickcom:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm//packages:.:/usr/share/php:/usr/share/pear') in /nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1264

[Thu Oct 27 22:07:51.224501 2016] [:error] [pid 1516] [client 208.124.188.134:42618] PHP Warning: include(/nas/content/live/mysite/wp-content/plugins/files/civicrm/templates_c/en_US//%%91/910/9105E2BB%%1477606071414776177.php): failed to open stream: No such file or directory in /nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1264

[Thu Oct 27 22:07:51.224611 2016] [:error] [pid 1516] [client 208.124.188.134:42618] PHP Warning: include(): Failed opening '/nas/content/live/mysite/wp-content/plugins/files/civicrm/templates_c/en_US//%%91/910/9105E2BB%%1477606071414776177.php' for inclusion (include_path='/nas/content/live/mysite/wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google:/nas/content/live/mysite/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/packages/:/nas/content/live/mysite/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/:.:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/vendor/tecnickcom:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm//packages:.:/usr/share/php:/usr/share/pear') in /nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1264

[Thu Oct 27 22:07:51.225795 2016] [:error] [pid 1516] [client 208.124.188.134:42618] PHP Warning: include(/nas/content/live/mysite/wp-content/plugins/files/civicrm/templates_c/en_US//%%CB/CBC/CBC1541F%%14776060711283623884.php): failed to open stream: No such file or directory in /nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1264

[Thu Oct 27 22:07:51.225911 2016] [:error] [pid 1516] [client 208.124.188.134:42618] PHP Warning: include(): Failed opening '/nas/content/live/mysite/wp-content/plugins/files/civicrm/templates_c/en_US//%%CB/CBC/CBC1541F%%14776060711283623884.php' for inclusion (include_path='/nas/content/live/mysite/wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google:/nas/content/live/mysite/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/packages/:/nas/content/live/mysite/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/:.:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/vendor/tecnickcom:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/:/nas/content/live/mysite/wp-content/plugins/civicrm/civicrm//packages:.:/usr/share/php:/usr/share/pear') in /nas/content/live/mysite/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1264

  • 1
    Please update your question with your CiviCRM and WordPress versions? – Jon G - Megaphone Tech Oct 29 '16 at 0:05
  • Also, what user does your cron job run as? – Jon G - Megaphone Tech Oct 29 '16 at 0:06
  • Hi Jon G. We are using CiviCRM 4.6 and WordPress 4.6.1. Thank you for looking into it. – Soroush Zo Oct 31 '16 at 13:57
  • And the user has Administrator role in WP. – Soroush Zo Oct 31 '16 at 14:21
  • 1
    I suppose Joh G means the unix user of the cron job. If the cron unix user is not allowed to write the templates_c, that can be a problem. What happens if you invoke the Scheduled Reminder Mail job from the userinterface? – Kainuk - CiviCooP Oct 31 '16 at 15:15
3

For anyone who may face this issue, it was finally fixed by WP Engine through adding an exception on the firewall for CiviCRM cron URL.

  • How do you actually run the cron? I have a new client which is already hosted on WP Engine, they get the notifications the no crons are run. But obviously I don't have SSH access to setup cron. How did you manage to do this? – Johan Haest Dec 21 '16 at 15:20
  • 1
    We are using URL method: wiki.civicrm.org/confluence/display/CRMDOC/… – Soroush Zo Dec 21 '16 at 16:26
  • 1
    mysite.com/wp-content/plugins/civicrm/civicrm/bin/… You can call this URL from anywhere maybe even from a free uptime monitoring service such as Pingdom. – Soroush Zo Dec 21 '16 at 16:31
  • Ok, sounds logical. I am getting a 500 error on the cron.php but debugging that is kinda hard on wpengine... The log file from wpengine inside the wp-engine (error log) doesn't log anything from the cron.php... – Johan Haest Dec 22 '16 at 13:53
  • Managed to finally fix the issues, path to the settings files etc were wrong and some couple of other errors. I'm just going to set crontab on one of my other servers to wget the cron once a while – Johan Haest Dec 23 '16 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.