What's New Digest

What's New Digest 5.0.6

No permission to download
I disable sending mails to users last week (check test option to send only to admin/my self) and one hour ago it send more than 800 mails to me.
Where is bug?

It seems that cron for weekly digest run, and send all mails that users would be reciving, send to e-mail for testing addon.
Isn't that what it's supposed to do? I'm not seeing where turning on test mode would only generate just one one email, just that that all emails get redirected to the 'Test Email Address' instead.
Turn this option on to implement test mode - all digest emails get sent to the forum administrator only
 
I disable sending mails to users last week (check test option to send only to admin/my self) and one hour ago it send more than 800 mails to me.
Where is bug?

It seems that cron for weekly digest run, and send all mails that users would be reciving, send to e-mail for testing addon.
Isn't that what it's supposed to do? I'm not seeing where turning on test mode would only generate just one one email, just that that all emails get redirected to the 'Test Email Address' instead.

Yes @Sunka - @Kevin is correct, it has done exactly what that option says it will do.

If you want to test sending just one email, there is a function in Admin > Tools to do that.

I admit that the Test Mode setting in Options isn't especially useful when you already have a large number of users registered - it was more intended for use in development. I might limit it to sending 5 emails or something.

To disable sending emails by default, you should set Default Frequency to "None" - in which case only users who have explicitly chosen to receive the emails will get them. To disable sending emails completely, you should turn off the two Cron jobs.
 
1. What does "top new" mean? Most recent? Most popular? some combination of those?

2. any updates on a new version incorporating some of the requests above?

1. From the FAQ:

Q) How many threads are included?

A) Up to 10 "New" threads (ie created within the last week or last 24 hours, ordered by most replies), plus up to 10 "Updated" threads (ordered by most number of replies made in the last week or 24 hours).

2. I'm really busy working on porting all of my other addons to XF2 right now in preparation for upgrading my 8 sites - I will revisit feature requests once I have time to do so.
 
PHP 7.3.2
MariaDB 10.3.12
XF 2.1.0
Error

Code:
Server error log
ErrorException: [E_NOTICE] compact(): Undefined variable: total src/addons/Hampel/WhatsNewDigest/XF/Admin/Controller/Tools.php:80
Generated by: Admin Feb 11, 2019 at 3:52 AM
Stack trace
#0 [internal function]: XF::handlePhpError(8, '[E_NOTICE] comp...', '/home/nginx/dom...', 80, Array)
#1 src/addons/Hampel/WhatsNewDigest/XF/Admin/Controller/Tools.php(80): compact('users', 'newThreads', 'updatedThreads', 'test', 'period', 'total', 'done', 'messages')
#2 src/XF/Mvc/Dispatcher.php(321): Hampel\WhatsNewDigest\XF\Admin\Controller\Tools->actionWhatsNewDigestTest(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'WhatsnewdigestT...', Object(XF\Mvc\RouteMatch), Object(Hampel\WhatsNewDigest\XF\Admin\Controller\Tools), NULL)
#4 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Hampel\WhatsNewDigest\XF\Admin\Controller\Tools), NULL)
#5 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#7 src/XF.php(390): XF\App->run()
#8 admin.php(13): XF::runApp('XF\\Admin\\App')
#9 {main}
Request state
array(4) {
  ["url"] => string(36) "/admin.php?tools/whatsnewdigest-test"
  ["referrer"] => string(60) "https://www.site.com/admin.php?tools/whatsnewdigest-test"
  ["_GET"] => array(1) {
    ["tools/whatsnewdigest-test"] => string(0) ""
  }
  ["_POST"] => array(4) {
    ["test"] => string(5) "users"
    ["period"] => string(5) "daily"
    ["_debug"] => string(1) "0"
    ["_xfToken"] => string(8) "********"
  }
}
 
Hello,

thx for your addon. It is fantastic. :)

Small bug: missing translate phrase for title "new threads" and "updated threads" in template "whatsnewdigest_email"
 
Great concept and a much needed feature.

I just installed and ran the test tool to see which users will receive a daily digest. I was surprised to see a very lengthy list.

Is the default behavior to subscribe users to the digest upon install of the add-on? That's not a good thing as many will object to getting emails they did not opt-in to.

Is there a way to only send to those who have opted in either at or after registration?
 
Is the default behavior to subscribe users to the digest upon install of the add-on? That's not a good thing as many will object to getting emails they did not opt-in to.

Is there a way to only send to those who have opted in either at or after registration?

In the options, the "default" Default Frequency is set to Weekly - which effectively makes it opt-out and means that everyone who has not explicitly chosen to not receive the emails by setting their personal preference to None (or Daily) will receive the weekly emails.

Change the "Default Frequency" to None which makes it opt-in and means that it will only send to members who have explicitly chosen to receive the daily or weekly emails.
 
In the options, the "default" Default Frequency is set to Weekly - which effectively makes it opt-out and means that everyone who has not explicitly chosen to not receive the emails by setting their personal preference to None (or Daily) will receive the weekly emails.

Change the "Default Frequency" to None which makes it opt-in and means that it will only send to members who have explicitly chosen to receive the daily or weekly emails.

Great. Thanks.
 
Every week after it runs I get the following error

Code:
    Exception: Email to [unknown] failed setup: Trying to send email to user without email (ID: 2780) src/XF/Mail/Mail.php:83

    Generated by: Unknown account Sep 23, 2019 at 2:52 AM

Stack trace

#0 src/addons/Hampel/WhatsNewDigest/Mail/Mailer.php(30): XF\Mail\Mail->setToUser(Object(Snog\Flags\XF\Entity\User))
#1 src/addons/Hampel/WhatsNewDigest/Cron/SendDigest.php(74): Hampel\WhatsNewDigest\Mail\Mailer->getMail(Object(Snog\Flags\XF\Entity\User), false)
#2 src/addons/Hampel/WhatsNewDigest/Cron/SendDigest.php(16): Hampel\WhatsNewDigest\Cron\SendDigest::sendDigest('weekly')
#3 [internal function]: Hampel\WhatsNewDigest\Cron\SendDigest::sendWeeklyDigest(Object(XF\Entity\CronEntry))
#4 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#5 src/XF/Job/Manager.php(253): XF\Job\Cron->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(28) "https://www.triumphtalk.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Every week after it runs I get the following error


This is the key bit here: Exception: Email to [unknown] failed setup: Trying to send email to user without email (ID: 2780) src/XF/Mail/Mail.php:83

You have users in your database who don't have an email address assigned.

To work around this you should edit that user's preferences and set "Receive Email Digest" to None

1569269546702.webp

I'll add some code to ignore users with empty email addresses - but that might take me a couple of days to find time to release an update, pretty busy right now.
 
This is the key bit here: Exception: Email to [unknown] failed setup: Trying to send email to user without email (ID: 2780) src/XF/Mail/Mail.php:83

You have users in your database who don't have an email address assigned.

To work around this you should edit that user's preferences and set "Receive Email Digest" to None

View attachment 210929

I'll add some code to ignore users with empty email addresses - but that might take me a couple of days to find time to release an update, pretty busy right now.

Yes I noticed that user ID but when I did a search on that ID it came up with nothing at all, this is why I thought I would just post it here.
 
Yes I noticed that user ID but when I did a search on that ID it came up with nothing at all, this is why I thought I would just post it here.

You mean there wasn't an entry in the user database for that user ID ?
 
It sounds like you've got some more serious issues happening there if you can't even view members.

Take a look in your database and see what's actually going on - if you've got incomplete user records, that will cause all sorts of havoc. Is there a row for that user in the user table?

There has to be an entry in the user table for my addon to try and send them an email. If you can't actually access the user records, then you've got some database corruption or something happening.

The admin URL to edit a user will look like this: http://www.example.com/admin.php?users/1/edit ... change the number to the userid you want to view and change the domain to match your forum. If you get an error viewing your user - you need to diagnose that first before trying to sort out problems with my addon.

Try disabling all addons and see if that makes a difference - there is a chance that one of them is causing the issue of not being able view this user record.
 
Top Bottom