[RC] Digests 3.2.4-RC11

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!
Ideas Centre
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)
User avatar
MarkDHamill
Registered User
Posts: 3309
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Digests 3.2.1-RC8 released

Post by MarkDHamill » Thu Apr 27, 2017 12:26 am

There's lots of new stuff in this release and lots of bugs fixed. You can download it from GitHub (see the first post) or directly here. This version works on phpBB 3.2 Rhea and will not work on phpBB 3.1.

To update, make sure you follow the standard procedures. First disable the last version. If you delete data you will lose all digest subscriptions, so it's not recommended. Delete the old files in /ext/phpbbservices/digests and replace it with the new files. Then enable the extension again.

Big thanks to all who reported bugs and asked for new features. I would be especially lax if I did not mention my French language translator Bonnaphil who asked lots of questions, did lots of testing and pushed me to deliver features I hadn't thought of, like making the digests (well, HTML version anyhow) look "prettier".

Summary of changes, Digests 3.2.0 to 3.2.1

Administration Control Panel
  • Explanation text added for weekly digest day, to indicate that digests may be received on the day before the day set for users in the western hemisphere, since digests are sent based on UTC. This is already stated in the User Control Panel.
  • BEHAVIOR CHANGE: Digests time zone removed. This was used in Edit Subscribers and in Balance load to show the hour digests are sent out. The timezone for the user in the User Control Panel is now used instead. This is less confusing.
  • NEW FEATURE: Switch allows administrator to show the full forum path in digests. If set this applies to all users.
  • NEW FEATURE: Switch allows administrator to lowercase the digest type. This is at the request of a language translator.
  • BUG FIX: The default board language is no longer used as the basis for making digest language decisions in the ACP. Instead, the language you set in the UCP is used instead which is the way phpBB does it elsewhere.
    NEW FEATURE: Dates are translated into the language needed. The PHP date function only works with English formatted dates. strftime and a new function is used to translate date items like month names from English to the language desired.
  • BUG FIX: When jQuery usage was introduced into Digests, it had the effect of undoing logic written that sent to the web server only those variables that were changed on the Edit Subscriber screen on form submission. Since there are so many fields, it could cause a PHP max_input_vars error. Changed the logic so that jQuery will handle this instead of regular Javascript.
  • Cleaned up the jQuery so selectors weren't used on multiple lines, the preferred way to do things in jQuery.
  • NEW FEATURE: Administrator can specify tags to remove from HTML digests to prevent certain security issues. Removed tags are replaced with a message indicating the tag was removed and suggesting clicking on the post link to see the full content.
  • BUG FIX: Mass subscriptions no longer set all new subscribers to the same hour. Rather if a random hour is requested, one is generated for each new subscriber. Previously after doing this you would also have to run Balance Load to distribute the digest send hour.
  • NEW FEATURE: Balance load shows the average digests sent per hour (rounded to the nearest whole number). Hours are shown in more usable format based on user's date/time format. A list of subscribers for the hour are also now shown with their digest type annotated by the styling used (none = daily, italics = weekly, bolded = monthly). In addition, you can limit balancing to a digest type (daily, weekly or monthly), you can specify the hours you want to balance and you can specify the hours to be used for balancing (for example, to avoid sending a digest in the middle of the night).
  • User default settings now use the same language strings used in the User Control Panel interface where possible.
General
  • NEW FEATURE: Timezone hours can be prefaced with a + if the hour is positive and the sprintf markup requests it.
  • BUG FIX: Function dateFormatToStrftime will ignore AM/PM designation in date formats.
    Created many additional plural rules for language files were appropriate
  • Where there is a substitution of more than one variable in a language string, they are now marked positionally, ex: %1$d instead of %d. This aids repositioning language elements in non-English translations.
  • BUG FIX: Subscribe to digests on registration logic changed. You must be a human (i.e. omits possibility that bots could get a digest).
  • MAJOR BUG FIX: Migrations of Digests from phpBB 3.0 no longer fails because an instance of the tools factory was not first declared. (This was not necessary in phpBB 3.1.)
Template changes
  • MAJOR ENHANCEMENT: HTML digests look "prettier". Background colors subtly change between posts within a topic making it easier to distinguish when posts begin and end. Background colors are consistent. Page background is now white. DIV boxes containing text no longer stretch across the width of the window if there is not much content.
Mailer
  • NEW FEATURE: Switch allows administrator to lowercase the first letter of the digest type.
  • NEW FEATURE: If show the forum path is enabled, the forum name in the digest will appear something like Category 1 :: Forum 1 :: Category A :: Forum B. Otherwise it will just show Forum B.
  • NEW FEATURE: If the switch that allows administrator to lowercase the digest type is enabled, behavior changes for how the board name is shown in digests. For example, in certain languages "Daily Digest" would be "Digest Daily" and will logically precede the board name. If set to yes, then the digest title will appear something like "Digest daily of my board name" depending on the translation with the first letter of the board name in lowercase.
  • BUG FIX: If for some reason the last time digests were successfully sent is after the current time, the mailer will log an error and abort. Otherwise an infinite loop starts.
  • BUG FIX: Language files are applied for each user based on their preferred language. This keeps for example a user who has their language set to French from getting English markup in the digest.
  • BUG FIX: Mailer no longer allows bots and inactive users to be selected in the initial query of users receiving digests for an hour.
  • MAJOR BUG FIX: List of posts for the time period is no longer constrained by the SQL call to limit the maximum number of digests based on the administrator or user's maximum posts settings. This can cause other users to not see posts.
  • MAJOR BUG FIX: Fixed bug that did not correctly compute month start and end dates for monthly digests. Date function was incorrectly called generating a warning.
  • NEW FEATURE: Digest translator can now be optionally identified and linked at the bottom of the digest.
  • BUG FIX: Fixed bug that printed a "No private messages" announcement twice in text digests.
  • MAJOR BUG FIX: Fixed bug that did not properly sort posts for some digests because no array was initialized.
  • NEW FEATURE: Dates appearing in digests are now translated to show month names and days of week (including abbreviations) in the user's language.
  • NEW FEATURE: Administrator specified tags (which may cause security problems) are removed from HTML posts. A message is substituted letting the subscriber know content was removed.
User Control Panel
  • Spacing for digest type is now consistent with other spacing for fields on the screen.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: [RC] Digests 3.2.1-RC8

Post by MarkDHamill » Fri Apr 28, 2017 2:02 am

I found one bug that affected Balance load. The counts are accurate but the hour is based on GMT+0, rather than the user's timezone as was intended. Published to GitHub. Change here.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: [RC] Digests 3.2.1-RC8

Post by MarkDHamill » Fri Apr 28, 2017 3:34 pm

Found a few more issues that principally affects the display of the send hour in edit subscribers. All changes pushed to master. This will require a new release. Changes:

https://github.com/MarkDHamill/digests/ ... e3781dcece
https://github.com/MarkDHamill/digests/ ... bf8f4e2111
https://github.com/MarkDHamill/digests/ ... fc1f141cc3
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Digests 3.2.2-RC9 released

Post by MarkDHamill » Sat Apr 29, 2017 10:30 pm

I noticed an obscure but critical bug in Edit Subscribers that misreported the hour the digest was sent in some cases, so a new release was warranted so quickly after the last one. In addition, the display hour in Edit Subscribers show shows a formatted hour. For example, it used to show 14, now it will show 2 PM if user_dateformat requests hours to show as AM or PM.

That's pretty much it, except for updating the version number and giving some better names to variables.

Translators: there are no language file changes.

To get the latest version, to the first post in the topic.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

steveosonic
Registered User
Posts: 13
Joined: Thu Mar 16, 2017 9:54 am

Re: [RC] Digests 3.2.2-RC9

Post by steveosonic » Sun May 14, 2017 8:08 am

Hi Mark

Thank you for the latest release.

The error I was getting disappeared for a number of days while, now I am again seeing this issue in the log:

Code: Select all

» Error in [ROOT]/phpbb/user.php on line 599: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given 	
And emails are being re-sent multiple times to the same users, in some cases 4 or 5 times a day.

Happy to provide Admin access if that is of any use?

Thanks again,
Steve

Mesto
Registered User
Posts: 34
Joined: Mon Jul 27, 2009 12:29 am

Re: [RC] Digests 3.2.2-RC9

Post by Mesto » Sun May 14, 2017 12:12 pm

Hello Mark,

if I klick at "Balance load" at ACP/Extensions/Digests, I get a http 500 error, but only at this menupoint. All other menus are visible. Do you have an idea?

Thank you in advance and regards!

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

Re: [RC] Digests 3.2.2-RC9

Post by MarkDHamill » Sun May 14, 2017 2:30 pm

steveosonic wrote:
Sun May 14, 2017 8:08 am
Hi Mark

Thank you for the latest release.

The error I was getting disappeared for a number of days while, now I am again seeing this issue in the log:

Code: Select all

» Error in [ROOT]/phpbb/user.php on line 599: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given 	
And emails are being re-sent multiple times to the same users, in some cases 4 or 5 times a day.

Happy to provide Admin access if that is of any use?

Thanks again,
Steve
Invalid date/time strings can be ignored based on changes I made to /core/common.php. UTC is used if the date/time string won't translate.

I think the underlying issue is that Balance Load can select bots and these strings are not set for bots. That will be fixed in the next version.

See if this fixes things.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: [RC] Digests 3.2.2-RC9

Post by MarkDHamill » Sun May 14, 2017 2:32 pm

Mesto wrote:
Sun May 14, 2017 12:12 pm
Hello Mark,

if I klick at "Balance load" at ACP/Extensions/Digests, I get a http 500 error, but only at this menupoint. All other menus are visible. Do you have an idea?

Thank you in advance and regards!
I'd pull my latest master off GitHub and see if it goes away.

https://github.com/MarkDHamill/digests

It's probably related to the last post.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Mesto
Registered User
Posts: 34
Joined: Mon Jul 27, 2009 12:29 am

Re: [RC] Digests 3.2.2-RC9

Post by Mesto » Sun May 14, 2017 7:17 pm

MarkDHamill wrote:
Sun May 14, 2017 2:32 pm
I'd pull my latest master off GitHub and see if it goes away.
Now it works, but I have an another question/problem. I don't get an email.

Here my configuration:
ImageImageImageImage

Could you give me a hint, what I'm doing wrong?

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

Re: [RC] Digests 3.2.2-RC9

Post by MarkDHamill » Mon May 15, 2017 12:16 am

Most likely the issue is there is a mismatch between the hour you want the digest and the hour the mailer was run. For a list of issues that can cause digests not to go out, see the first post (follow the testing procedures) and follow the link to my blog post.

If there is some emailing issue, it should appear in the phpBB error log.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: [RC] Digests 3.2.2-RC9

Post by MarkDHamill » Mon May 15, 2017 1:55 am

Looks like the validateDate() function in /core/common.php is incorrect. Rather it will find all dates incorrectly formatted and return UTC. It should be:

Code: Select all

	private function validateDate($date)
	{
		$d = \DateTime::createFromFormat('e', $date);
		return $d && $d->format('e') === $date;
	}
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

steveosonic
Registered User
Posts: 13
Joined: Thu Mar 16, 2017 9:54 am

Re: [RC] Digests 3.2.2-RC9

Post by steveosonic » Mon May 15, 2017 8:18 am

Thank you Mark, I have pulled the Master from git and made the change in your post above.

I'll keep an eye and get back to you when I have firm information.

Thank you again.

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

Re: [RC] Digests 3.2.2-RC9

Post by MarkDHamill » Mon May 15, 2017 1:21 pm

My bad I guess for not testing this thoroughly enough.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

steveosonic
Registered User
Posts: 13
Joined: Thu Mar 16, 2017 9:54 am

Re: [RC] Digests 3.2.2-RC9

Post by steveosonic » Tue May 16, 2017 3:36 pm

No problem Mark, you're giving up your time for free and I and others appreciate that.

Unfortunately despite the changes I'm still getting multiple errors in the log:

Code: Select all

Error while creating image
» Error in [ROOT]/phpbb/user.php on line 599: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given
Maybe there is something weird about my server, or UK set up that can't be reproduced elsewhere.

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

Digests 3.2.3-RC10 Released

Post by MarkDHamill » Tue May 16, 2017 6:26 pm

In this version (compared with 3.2.2):
  • Improvement: $user->format_date() is used to create dates that show correct date abbreviations based on the language pack used. Thanks to Petr Hendl, the Czech digest extension translator, for finding this built-in approach. Consequently, I removed the dateFormatToStrftime() function.
  • Bug fix: Balance load previously ignored inactive users only. Now it also ignores bots, meaning normal users and founders are the only user types balanced.
  • <br /> tags changed to <br> tags, since HTML 5 is not particular like XHTML.
  • Improvement: make_tz_offset() checks for invalid user_timezone strings. If it is invalid, UTC is used for the timezone.
  • Bug fix: Fixed a bug in the validateDate() function. It was incorrectly finding every user_timezone string invalid.
  • Improvement: The digests cron calculates the date and hour digests were last run successfully, and uses this to determine if digests should be run. This should solve the potential hour creep problem and allow digests to go out for the hour on the hour even if the last time they were successfully sent out was not on the hour being processed.
  • Bug fix: The cron includes includes/functions_content.php only if it is not already loaded.
  • Bug fix: Created a circuit breaker that prohibits a digest from going out as a duplicate if the timestamp for the time a user last received a digest indicates it is for the current date and hour.
  • The cron adds a language pack only if it has not already been loaded.
  • Improvement: Curly single and double quotes are now used in language strings.
  • All hours processed by the cron show successful completion, even though individual digests may not go out successfully. This keeps the cron from getting stuck indefinitely at a certain date and hour.
See the first posts for a download link.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: BigRed01, david63, nou nou, remoss, Yahoo [Bot] and 24 guests

cron