What's New Digest

What's New Digest 5.1.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.
 
Back
Top Bottom