What's New Digest

What's New Digest 5.3.0

No permission to download
Where do you see that? Did it cause a problem?

You'll see errors in your log with error code 454 I think - SES will throttle you and emails won't get sent. If you don't see them then likely you're good. Each provider will have their own policy around rate limits etc.
 
Hmm, I did apply for a higher SES send rate soon after I created my forum, but I think a lot of people are using SES and I've never heard of them having that error. I did see that there was a xenforo 1.x addon that handled queueing and throttling, but it was no longer needed in XF 2.x.

My understanding is that XF will simply send out emails as fast as your SMTP will allow. All emails should be queued and sent.

If you're getting XF errors, and even worse, dropped emails, that you think are related to SES's rate limits you should report it to the XF bug section, since that should apply for all emails (not just from this addon).
 
@Sim would it be very hard to allow members to select which forums they receive the digest from?
In my MG EVs forum, people own one car and only want updates from the forum for that car.
 
@Sim would it be very hard to allow members to select which forums they receive the digest from?
In my MG EVs forum, people own one car and only want updates from the forum for that car.

Yeah that would probably be useful on ZooChat as well.

I don't have time to build this functionality right now (focus is on getting ZooChat upgraded to XF 2.3!) - I'll put it on the todo list though.
 
@Sim FYI the first time I ran the upgrade to 5.1.0 on AVForums, I got this error:
Server error log
  • XF\PrintableException: Batch install error: Callback Hampel\WhatsNewDigest\Listener::nonTransactionalStopMap is invalid (error_invalid_method).
  • src/XF/Mvc/Entity/Entity.php:1228
  • Generated by: Stuart Wright
  • Jan 14, 2025 at 8:39 AM

Stack trace​

#0 src/XF/AddOn/DataType/CodeEventListener.php(73): XF\Mvc\Entity\Entity->save(true, false)
#1 src/XF/Job/AddOnData.php(110): XF\AddOn\DataType\CodeEventListener->importAddOnData('Hampel/WhatsNew...', Object(SimpleXMLElement), 0, 7.95886)
#2 src/XF/Job/AddOnInstallBatch.php(341): XF\Job\AddOnData->run(7.95886)
#3 src/XF/Job/AddOnInstallBatch.php(95): XF\Job\AddOnInstallBatch->stepData(Object(XF\Timer))
#4 src/XF/Job/Manager.php(260): XF\Job\AddOnInstallBatch->run(8)
#5 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#6 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#7 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#8 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(Wutime\AdBlockTracker\XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Wutime\AdBlockTracker\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2485): XF\Mvc\Dispatcher->run()
#13 src/XF.php(524): XF\App->run()
#14 admin.php(13): XF::runApp('XF\\Admin\\App')
#15 {main}

Request state​

array(4) {
["url"] => string(24) "/admin.php?tools/run-job"
["referrer"] => string(48) "https://www.avforums.com/admin.php?tools/run-job"
["_GET"] => array(1) {
["tools/run-job"] => string(0) ""
}
["_POST"] => array(3) {
["_xfRedirect"] => string(85) "https://www.avforums.com/admin.php?add-ons/install-from-archive-complete&batch_id=366"
["_xfToken"] => string(8) "********"
["only_ids"] => string(7) "9999470"
}
}
So I tried the install again and the second time, it installed correctly without error.
 
Yeah that would probably be useful on ZooChat as well.

I don't have time to build this functionality right now (focus is on getting ZooChat upgraded to XF 2.3!) - I'll put it on the todo list though.
How is it looking?
Could you create a premium version and charge for it? That would motivate you to build it and those admins who value it (like me) would be happy to pay.
 
How is it looking?
Could you create a premium version and charge for it? That would motivate you to build it and those admins who value it (like me) would be happy to pay.

Motivation isn't the issue right now - time is. Things are completely insane at the moment.

Need to get on top of a few things and then my runway will clear a bit and I'll be able to take a look at this and other addons I want to build or improve.
 
Simon, I've been trying to add the forum logo to all emails per: https://xenforo.com/community/threads/logo-on-emails-really-simple-way.157687/

When I send a test email to the admin, per /admin.php?tools/whatsnewdigest-test, it shows the logo at the top. But when the actual digest gets sent out, it uses the text of the forum title instead of the logo.

I looked at this addon's templates, but I'm not too sure what to change. I used this code for one of the default/main email templates. Do you think the current behavior should remain the default?
 
What is the actual URL that is being rendered in the emails in both cases?

The only difference in the mail sending code between the test routine and the actual digest emails is that the digest emails are sent via a Job which in turn enqueues the emails - whereas the test code sends the emails directly.

In any case, the digest emails are sent using the MAIL_CONTAINER template, which is a core template - if your edits to that template aren't working, it's likely not because of anything with my addon, but rather something more fundamental.

Two things that need to happen to make this work:
  1. the URL being generated by your template edit needs to be valid
  2. the image needs to be publicly accessible by guests (ie if you can't see the image when you paste the URL into a browser running in incognito mode, then it won't work in an email)
 
What is the actual URL that is being rendered in the emails in both cases?
The home page of the forum. There's no problem with the URL. The logo image is public -- the code uses publicLogoUrl.

I think this code in the whatsnewdigest_email template is the culprit?
Code:
    'board': '<a href="' . link('canonical:index') . '">' . $xf.options.boardTitle . '</a>'

But I'm not entirely sure what to change it to, because of that 'board': part. For MAIL_CONTAINER I changed:

Code:
            <td class="header" align="center" valign="top">
                <a href="{{ link('canonical:index') }}">{$xf.options.boardTitle}</a>
            </td>
to:
Code:
                <td class="summaryHeaderBar" align="center" valign="top">
                    <xf:if is="property('emailPublicLogoUrl')">
                        <a href="{{ link('canonical:index') }}"><img src="{{ base_url(property('emailPublicLogoUrl'), true) }}" alt="{$xf.options.boardTitle}" /></a>
                    <xf:elseif is="property('publicLogoUrl')" />
                        <a href="{{ link('canonical:index') }}"><img src="{{ base_url(property('publicLogoUrl'), true) }}" alt="{$xf.options.boardTitle}" width="{{ property('publicLogoWidth') ?: '' }}" height="{{ property('publicLogoHeight') ?: '' }}" class="{{ property('publicLogoUrl')|to_lower|substr(-4) == '.svg' ? 'logo-svg' : '' }}" /></a>
                    <xf:else />
                        <a href="{{ link('canonical:index') }}">{$xf.options.boardTitle}</a>
                    </xf:if>
                </td>

Per the instructions I referenced. And that did enable the logo for emails other than What's New Digest.
 
I think this code in the whatsnewdigest_email template is the culprit?

That's just generating the phrase that shows at the top of the email.

I just tested this on my dev server - used a template modification to change the MAIL_CONTAINER to add the emailPublicLogoUrl or publicLogoUrl and then manually ran the cron task to generate the digest email. The logo showed up on the emails as expected - showed the public logo and then I added an email logo to my style and it showed on the next test.
 
That's just generating the phrase that shows at the top of the email.
Yes, that's what I'm talking about. The mod I'm trying to do changes that phrase to the forum logo. And that's what I think should be the default for this addon. It's the default for the Activity Summary.
 
Like I said I simply did a template modification on the MAIL_CONTAINER to match what the activity summary emails use and it worked - logo appears on all emails including the digest emails

When I get a chance I will release a new version of the addon which does this without a template modification but for now a template modification is very easy.
 
@Sim are you 100% sure that when people unsubscribe from the digest that they remain unsubscribed? I have an upset member threatening to complain to GDPR (in the UK) because they say that they unsubscribed several times but continued to receive them.

Your unsubscribe is broken and breaking the law​

Sorry to be a bit blunt about this but I'm getting a bit fed up of constantly having to do this (And this isn't a me issue, I used to build plugins for XenForo so know how it works).

You keep sending me digest emails. I keep hitting unsubscribe. I also keep going to the account preferences page and opting out of all emails, yet a few weeks later I get another email, and sure enough its all been turned back on again.

Please either fix this, or just delete my account as I'm not using it enough to care about digest emails. It's in your interest to fix it given right now it's violating CAN-SPAM, GDPR & ePrivacy.
 
Sim updated What's New Digest with a new update entry:

v5.3.0 - Bugfixes and updated test tool

  • bugfix: user preference field in AdminCP wasn't showing in XF 2.3 due to template modifications that no longer worked - this has been fixed
  • bugfix: unsubscribe uses stopAllExcept by default in XF 2.3 - so we need to ensure we're stopping Whats New Digest if this is called instead of StopAll
  • update test tool to allow sending test emails to a specific user - and handling no threads

Updated test tool now allows you to choose a user to receive a test email digest - which...

Read the rest of this update entry...
 
@Sim are you 100% sure that when people unsubscribe from the digest that they remain unsubscribed? I have an upset member threatening to complain to GDPR (in the UK) because they say that they unsubscribed several times but continued to receive them.

Thanks for bringing this to my attention Stuart - there was indeed a bug with the unsubscribe handling - it broke due to a change in behaviour introduced in XF 2.3 that I didn't pick up. Partially because I use SparkPost which over-writes the unsubscribe headers created by XenForo with their own - and so my unsubscribes coming in via SparkPost were still working, but the core XF unsubscribes were not.

I've fixed this in What's New Digest v5.3.0 - please install this updated version and please send my apologies to your user for the bug in my addon causing their frustration (or at least feel free to blame me in your response to them!!).

FWIW, I've also made some changes to my testing tool which allows you to send a digest email test to a specific user. I used this with a test user account to validate that unsubscribes are now working as expected. Hint: you need to send a POST request to the URL in the unsubscribe header to trigger the unsubscribe process.
 
Back
Top Bottom