I found a bug that causes a PHP error (or "white screen" when errors are not visible).
Conditions to reproduce:
- Install Drupal Commerce
- Install MailJet and the MailJet_stats submodule
- Don't install the mailjet_campaign module
The error:
When you proceed through checkout and would normally get to the Checkout Complete screen, that's when the error occurs: Fatal error: Call to undefined function mailjet_campaign_load(). That's because the function mailjet_stats_commerce_checkout_complete() is calling mailjet_campaign_load(), but the mailjet_campaign module isn't installed, and therefore the function isn't available.
The fix:
Add a check such as function_exists() or module_exists().
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | mailjet_stats_campaign-2966667-2.patch | 829 bytes | hargobind |
Comments
Comment #2
hargobindAttached is a patch which adds a
function_exists()check.If you use this patch or any of the code in it, please follow Drupal's best practices for commit messages. Please have a look at Commit messages - providing history and credit. In short, use the syntax
Issue #[issue number] by [comma-separated usernames]: [Short summary of the change]. This helps commits appear in the issue queue automatically, and gives commit credits to people who have authored patches for your projects.Comment #3
hargobindComment #4
mailjet plugins commentedThe issue has been fixed in v. 7.x-2.18
Comment #5
mailjet plugins commented