[CDB] Digests 3.2.11

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: [RC] Digests 3.2.4-RC11

Post by DavidIQ »

The reset seems to have "fixed" it, but why would it be trying to catch up at all? Plus it seems to fail at trying to catch up. There some setting I haven't seen that would prevent this "catch-up"?
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.4-RC11

Post by MarkDHamill »

If digests have been offline, for example the board was disabled for a long period of time due to an upgrade, digests will try to catch up. Every time an hour is processed the date and hour digests were last sent successfully is stored in a configuration variable as a Unix timestamp. I don't see how this would get changed unless it is due to a bug, but it's possible. If the value in the database were edited, this could cause the problem.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.4-RC11

Post by MarkDHamill »

I found a new bug in Balance load function. Essentially, the subscriber names shown for a given hour are incorrect. They are shifted to an hour offset from the user's timezone from UTC. So if your profile's timezone is -4UTC and you are subscribed for a digest at 16h in your timezone (20h UTC), the count for the hour is correct (you will show up in the count for 16h) but your name will appear for 20h.

The code fix below applies to the latest version 3.2.4. If you want to fix this, edit ext/phpbbservices/digests/acp/main_module.php. Near the bottom of the file look for the get_subscribers_for_hour() function. Change line 2022 from:

Code: Select all

	function get_subscribers_for_hour ($hour, $tz_text)
to

Code: Select all

	function get_subscribers_for_hour ($hour, $offset_from_utc)
and change lines 2029-2030 from:

Code: Select all

		$hour_utc = $hour - $this->helper->make_tz_offset($tz_text);
		$hour_utc = $this->helper->check_send_hour($hour_utc);
to

Code: Select all

		$hour_utc = $this->helper->check_send_hour($hour - $offset_from_utc);
That's it. You don't need to purge the cache.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
jan_2017
Registered User
Posts: 161
Joined: Sun May 07, 2017 3:39 pm

Re: [RC] Digests 3.2.4-RC11

Post by jan_2017 »

I see no tables in the e-mail.
Settings : HTML with table was chosen.

Purge Cache done.

I use a Board with 3.2.0 phpbb and the newest digests Version.

Can anyone help me?

thx Jan
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.4-RC11

Post by MarkDHamill »

It's unclear if you are seeing any content at all. If digest logging is enabled there should be evidence in the Admin log of digests being created and going out.

It could be that your settings are incorrect.

Try using the manual mailer feature, and save the output to disk. Then in the maintenance log get the filename that was created and view it. Is there a table?
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
jan_2017
Registered User
Posts: 161
Joined: Sun May 07, 2017 3:39 pm

Re: [RC] Digests 3.2.4-RC11

Post by jan_2017 »

I'm sorry ..... i uninstall digests.
Thanks

Jan
arnyeinstein
Registered User
Posts: 16
Joined: Mon Oct 03, 2016 1:17 pm

Digests 3.2.4-RC11 problems with installation

Post by arnyeinstein »

Hi Mark
I updated from 3.1.10 to 3.2 and removed the old digest folder (I don't seem to find any crontabs). I moved the new digest version to the described folder and added a cache folder within (777). However, when I "enable" digest, I get the message

"Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.
MODULE_EXISTS
Return to the extension list"

Any help would be appreciated.
Renger
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.4-RC11

Post by MarkDHamill »

You don't need to add a cache folder inside the digest extension. Rather, it uses phpBB's cache folder instead. So if you use the manual mailer to send the digests to files instead of mailing them, they will show up under /cache/phpbbservices/digests. In the admin log you will see the file name.

Your error was probably due to not disabling the digests extension prior to upgrading phpBB, a standard procedure if you read the documentation for upgrading phpBB. By disabling it first, the modules would have been removed. By enabling it again without doing this, the modules already exist. So you may have to do the following:
  1. Manually delete the digests modules using SQL: DELETE FROM `phpbb_modules` WHERE `module_langname` LIKE '%DIGESTS%'
  2. Purge the cache
  3. Try again
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
arnyeinstein
Registered User
Posts: 16
Joined: Mon Oct 03, 2016 1:17 pm

Re: [RC] Digests 3.2.4-RC11

Post by arnyeinstein »

Mea culpa! Thanks for the fast reply. It is now working again
Renger
dafinch
Registered User
Posts: 14
Joined: Thu Apr 28, 2005 1:11 pm

Re: [RC] Digests 3.2.4-RC11

Post by dafinch »

Mark,

We have a phpbb3.1 board running your digest extension. We have been having a problem for a couple months where the cron process was failing and not sending out mail. But we found we could manually run the mailer in the extension tab in the acp. This week we found the root cause which was the max memory size for a php script to run being set at 128meg. Once we bumped it to 256meg everything started working. This setting was in the php.ini file.

Now the issue we have is when the auto cron jobs runs it want to send mail out going back 2 months. How can I reset that last sent date/time. I see a field in the user table named user_digest_last_sent. I'm guessing that needs to be changed but its a large integer and I don't know how to calculate what to put in there or if that would even fix the issue.

Andy suggestions would be appreciated.
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.4-RC11

Post by MarkDHamill »

dafinch,

Good troubleshooting. There is a simple solution to your problem. In the ACP, on the Extensions tab select the option to Reset mailer, select Yes and Submit.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
dafinch
Registered User
Posts: 14
Joined: Thu Apr 28, 2005 1:11 pm

Re: [RC] Digests 3.2.4-RC11

Post by dafinch »

Oh perfect. Thank you Mark!
User avatar
nou nou
Registered User
Posts: 507
Joined: Sat Oct 29, 2016 8:08 pm

Re: [RC] Digests 3.2.4-RC11

Post by nou nou »

Hello Mark,


I have a general question regarding Digests. I remember you saying at some point that the extension is built for convenience rather than performance. Would you say that there may be a point where running this extension would prove problematic? Like, from 100 users, or maybe 10000?

Or does it not really matter, and that was meant as a general comment?

Thanks for the great work on Digests by the way, looking forward to its release!
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.4-RC11

Post by MarkDHamill »

Later versions of the digest mod and the digest extension are much more efficient. The database is queried just once for posts and the posts are placed in an array. The mailer parses the array and filters out posts that don't meet the user's criteria. Private messages in digests though are queried at the time the digest is assembled for a particular user.

The main issue with sending out digests has to do with hosting quotas on outgoing emails. phpBB could do much better at handling this issue. I wrote a post on my blog that talks about the handshake issues between phpBB and email servers.

There is also the issue of timely delivery of digests. In general using a system cron is recommended or your users have to be forgiving if digests are received late due to little board traffic. This issue is discussed in the first post.

If you don't have to worry about emailing quotas and have a dedicated or virtual server with plenty of CPU at your disposal in general there should be no issues. Sometimes PHP settings have to be tweaked so the mailer won't time out.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
nou nou
Registered User
Posts: 507
Joined: Sat Oct 29, 2016 8:08 pm

Re: [RC] Digests 3.2.4-RC11

Post by nou nou »

Thanks Mark, that's very helpful :)
Locked

Return to “Extensions in Development”