Error messagin by cron run.

Notice: Undefined variable: body in _subscriptions_mail_cron() (Zeile 104 von /sites/all/modules/subscriptions/subscriptions_mail.cron.inc).
Notice: Undefined variable: mailvars in _subscriptions_mail_cron() (Zeile 109 von /sites/all/modules/subscriptions/subscriptions_mail.cron.inc).
Notice: Undefined variable: mailvars in _subscriptions_mail_cron() (Zeile 110 von /sites/all/modules/subscriptions/subscriptions_mail.cron.inc).

Comments

vegantriathlete’s picture

I can verify that I am getting the same three error messages for each piece of content I added:

Notice: Undefined variable: body in _subscriptions_mail_cron() (line 104 of .../drupal7/sites/all/modules/subscriptions/subscriptions_mail.cron.inc)
Notice: Undefined variable: mailvars in _subscriptions_mail_cron() (line 109 of .../drupal7/sites/all/modules/subscriptions/subscriptions_mail.cron.inc)
Notice: Undefined variable: mailvars in _subscriptions_mail_cron() (line 110 of .../drupal7/sites/all/modules/subscriptions/subscriptions_mail.cron.inc)

I am on Drupal 7.9 and Subscriptions 7.x-1.0-alpha6.

As a result of the errors, the notification is not actually sent. The errors are happening on my "Images" content type, which has the following fields: Title, Image, Overlay Text, URL path settings. IOW, there is no Body field (I have deleted it), there are two fields from other modules, and two fields I have added on my own.

vegantriathlete’s picture

I added a blog entry to test what would happen and I still got the same three error messages. In addition, after attempting to send the notification to a user (Notification sent to ...) there is another error message:

Warning: Invalid argument supplied for foreach() in _subscriptions_mail_send() (line 249 of .../drupal7/sites/all/modules/subscriptions/subscriptions_mail.cron.inc)

I have not modified the "Blog entry" content type. It's the standard one that the Blog module creates.

It's possible that I hadn't seen this error message before because nobody was subscribed to the "Images" content type.

salvis’s picture

Title: Error messagin by cron run. » "Undefined variable" notices when trying to use Digest Mode
Category: bug » support
Status: Active » Fixed

Line 104 through 112 are used in digest mode only. We know that Digest Mode does not work yet in ALPHA6.

See also #1327376: Implementing digest mode for D7. Do not try to use Digest Mode until it's ready.

Please open a new issue for #2.

salvis’s picture

Please see #1327376-8: Implementing digest mode for D7 — feel free to reopen this issue if this is still a problem with the -dev (or upcoming BETA1) version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.