2

I've only recently started using Craft, so please excuse me if this is an obvious or silly question, but I've run into this problem when trying to create notifications on Sprout Emails (triggered by a Sprout Form).

The error is as follows:

PHP warning

Creating default object from empty value

/var/www/craft/plugins/sproutemail/services/SproutEmailService.php(506)

...
505         // Add a few additional variables to our info table
506         $event->params['variables']['info']->deliveryStatus = $deliveryStatus;
507         $event->params['variables']['info']->message        = $message;
...

I'm really not sure how to fix this - each form worked perfectly before, and it's only since I started using Sprout Email twenty minutes ago!

If I've not included enough code please tell me and I can include more!

Thank you

2
  • Can you confirm which versions of Sprout Forms, Sprout Email and Craft you are using and ensure they are the latest? If so, we may need you to drop us a note to support with a db dump to help take a closer look at what's going on: sprout.barrelstrengthdesign.com/craft-plugins/request/support Aug 19 '16 at 13:52
  • Craft CMS 2.6.2797, Sprout Email 2.3.0, Sprout Forms 2.3.2 is what I am working with, is this right? Aug 19 '16 at 13:57
2

This error can be triggered when you try to use a variable name in your Sprout Email template or fields that is not present in the submitted Form data.

One example where this can occur is if you try to reuse the example Welcome Notification email provided in Sprout Email and don't update the {email} or {username} values in the HTML and Text body fields.

I'll add it to our list to revisit the error thrown here, as it's not clear at all what is happening from the error provided in the message you received above.

4
  • Interestingly enough, neither template references any values passed by the form at the minute, I was waiting to implement that later. Aug 19 '16 at 14:22
  • Alright, I may need you to send over your db and any email templates you are referencing to support then: sprout.barrelstrengthdesign.com/craft-plugins/request/suppor‌​t Aug 19 '16 at 14:27
  • I'm not sure if I can do, as it may contain sensitive information. I'll check with my manager and then may open a support ticket. Thank you for your help! Aug 19 '16 at 14:31
  • Understood. If you can just send your Sprout Forms and Sprout Fields tables, that may be enough. Aug 19 '16 at 16:33

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.