PHP Fatal error: Cannot redeclare gen_sort_selects() ...
digest/cron/task/digests.php
from
Code: Select all
include($this->path_prefix . 'includes/functions_content.' . $this->phpEx);
Code: Select all
require_once($this->path_prefix . 'includes/functions_content.' . $this->phpEx);
Code: Select all
[Exception]
DateTimeZone::__construct(): Unknown or bad timezone (0)
user_timezone
was set to 0
. require_once
is generally not allowed in phpBB code.require_once
functions in some of these converted mods. So instead it should be include_once
.user_timezone
is set to 0 and in these cases to use the board timezone.require_once
statement which was in a third party library I used. I actually had to code around it to get it approved. I assume it would still raise a flag with a review team, so I've learned to avoid it.Code: Select all
'DIGESTS_TRANSLATED_BY' => 'translated by',
'DIGESTS_TRANSLATOR_NAME' => '', // Leave null string to suppress translator name
'DIGESTS_TRANSLATOR_CONTACT' => '', // Leave null string to suppress contact info, if used use: mailto:[email protected] or a URL if you have a website.
strftime
format instead./cron/task/digests.php
from:Code: Select all
// Execute the SQL to retrieve the relevant posts. Note, if $this->config['phpbbservices_digests_max_items'] == 0 then there is no limit on the rows returned
$result_posts = $this->db->sql_query_limit($sql_posts, $this->config['phpbbservices_digests_max_items']);
Code: Select all
$result_posts = $this->db->sql_query($sql_posts);
create_content()
function I manually count the posts in the digests anyhow, so the code is not necessary. It will be fixed in the next version. Thanks for reporting it.ext/phpbbservices/digests/migrations/convert_mod_schema.php
, line 67 is:Code: Select all
$tools = new \phpbb\db\tools($this->db);
Code: Select all
$tools_factory = new \phpbb\db\tools\factory();
$tools = $tools_factory->get($this->db);
<iframe>…</iframe>
in html mails.Enable automatic subscriptions:
is switched on. It is under normal circumstances no problem, but I used a script which added about 200 common bots and some of them had email addresses UPDATE `phpbb_users` SET `user_digest_type` = 'NONE' WHERE `group_id` =6 AND `user_digest_type` LIKE 'WEEK'
solved the problem, but maybe the extension should exclude bots from subscribing to the digest Excellent catch! Adding new robots is so unusual I'm not surprised no one has noticed until now.whocarez wrote: Sun Feb 19, 2017 10:09 am Another small issue is, that bots are also added to the digest, when a new one is added andEnable automatic subscriptions:
is switched on. It is under normal circumstances no problem, but I used a script which added about 200 common bots and some of them had email addresses. So I got a lot of bounced emails for the standard weekly digest for which new users are automatically subscribed.
UPDATE `phpbb_users` SET `user_digest_type` = 'NONE' WHERE `group_id` =6 AND `user_digest_type` LIKE 'WEEK'
solved the problem, but maybe the extension should exclude bots from subscribing to the digest.
/ext/phpbbservices/digests/event/main_listener.php
are:Code: Select all
if ($this->config['phpbbservices_digests_enable_auto_subscriptions'] == 1 || $subscribe_on_registration)
{
$sql_ary = $event['sql_ary'];
$sql_ary['user_digest_attachments'] = $this->config['phpbbservices_digests_user_digest_attachments'];
$sql_ary['user_digest_block_images'] = $this->config['phpbbservices_digests_user_digest_block_images'];
$sql_ary['user_digest_filter_type'] = $this->config['phpbbservices_digests_user_digest_filter_type'];
$sql_ary['user_digest_format'] = $this->config['phpbbservices_digests_user_digest_format'];
$sql_ary['user_digest_max_display_words'] = $this->config['phpbbservices_digests_user_digest_max_display_words'];
$sql_ary['user_digest_max_posts'] = $this->config['phpbbservices_digests_user_digest_max_posts'];
$sql_ary['user_digest_min_words'] = $this->config['phpbbservices_digests_user_digest_min_words'];
$sql_ary['user_digest_new_posts_only'] = $this->config['phpbbservices_digests_user_digest_new_posts_only'];
$sql_ary['user_digest_no_post_text'] = $this->config['phpbbservices_digests_user_digest_no_post_text'];
$sql_ary['user_digest_pm_mark_read'] = $this->config['phpbbservices_digests_user_digest_pm_mark_read'];
$sql_ary['user_digest_remove_foes'] = $this->config['phpbbservices_digests_user_digest_remove_foes'];
$sql_ary['user_digest_reset_lastvisit'] = $this->config['phpbbservices_digests_user_digest_reset_lastvisit'];
$sql_ary['user_digest_send_hour_gmt'] = ($this->config['phpbbservices_digests_user_digest_send_hour_gmt'] == -1) ? rand(0,23) : $this->config['phpbbservices_digests_user_digest_send_hour_gmt'];
$sql_ary['user_digest_send_on_no_posts'] = $this->config['phpbbservices_digests_user_digest_send_on_no_posts'];
$sql_ary['user_digest_show_mine'] = ($this->config['phpbbservices_digests_user_digest_show_mine'] == 1) ? 0 : 1;
$sql_ary['user_digest_show_pms'] = $this->config['phpbbservices_digests_user_digest_show_pms'];
$sql_ary['user_digest_sortby'] = $this->config['phpbbservices_digests_user_digest_sortby'];
$sql_ary['user_digest_toc'] = $this->config['phpbbservices_digests_user_digest_toc'];
$sql_ary['user_digest_type'] = $this->config['phpbbservices_digests_user_digest_type'];
$event['sql_ary'] = $sql_ary;
}
Code: Select all
$is_human = ($event['sql_ary']['user_type'] == USER_IGNORE) ? false : true;
if ($is_human && ($this->config['phpbbservices_digests_enable_auto_subscriptions'] == 1 || $subscribe_on_registration))
{
$sql_ary['user_digest_attachments'] = $this->config['phpbbservices_digests_user_digest_attachments'];
$sql_ary['user_digest_block_images'] = $this->config['phpbbservices_digests_user_digest_block_images'];
$sql_ary['user_digest_filter_type'] = $this->config['phpbbservices_digests_user_digest_filter_type'];
$sql_ary['user_digest_format'] = $this->config['phpbbservices_digests_user_digest_format'];
$sql_ary['user_digest_max_display_words'] = $this->config['phpbbservices_digests_user_digest_max_display_words'];
$sql_ary['user_digest_max_posts'] = $this->config['phpbbservices_digests_user_digest_max_posts'];
$sql_ary['user_digest_min_words'] = $this->config['phpbbservices_digests_user_digest_min_words'];
$sql_ary['user_digest_new_posts_only'] = $this->config['phpbbservices_digests_user_digest_new_posts_only'];
$sql_ary['user_digest_no_post_text'] = $this->config['phpbbservices_digests_user_digest_no_post_text'];
$sql_ary['user_digest_pm_mark_read'] = $this->config['phpbbservices_digests_user_digest_pm_mark_read'];
$sql_ary['user_digest_remove_foes'] = $this->config['phpbbservices_digests_user_digest_remove_foes'];
$sql_ary['user_digest_reset_lastvisit'] = $this->config['phpbbservices_digests_user_digest_reset_lastvisit'];
$sql_ary['user_digest_send_hour_gmt'] = ($this->config['phpbbservices_digests_user_digest_send_hour_gmt'] == -1) ? rand(0,23) : $this->config['phpbbservices_digests_user_digest_send_hour_gmt'];
$sql_ary['user_digest_send_on_no_posts'] = $this->config['phpbbservices_digests_user_digest_send_on_no_posts'];
$sql_ary['user_digest_show_mine'] = ($this->config['phpbbservices_digests_user_digest_show_mine'] == 1) ? 0 : 1;
$sql_ary['user_digest_show_pms'] = $this->config['phpbbservices_digests_user_digest_show_pms'];
$sql_ary['user_digest_sortby'] = $this->config['phpbbservices_digests_user_digest_sortby'];
$sql_ary['user_digest_toc'] = $this->config['phpbbservices_digests_user_digest_toc'];
$sql_ary['user_digest_type'] = $this->config['phpbbservices_digests_user_digest_type'];
$event['sql_ary'] = array_merge($event['sql_ary'], $sql_ary);
}
While I appreciate the suggestion, it is not practical for me to tailor the extension to optimally accommodate other extensions. Digests sometimes do end up in a spam folder regardless. The best solution to this (assuming GMail) is probably to add the sending email address as a contact or create a filter not to send these to spam.whocarez wrote: Sat Feb 18, 2017 12:45 pm @MarkDHamill thank you for your quick support!
Today I detected another issue that is linked to the s9e/mediaembeded extension.
If a post contains links embedded by this extension, for example a youtube video, than it renders it within an iframe. Iframes are in emails often considered as dangerous or spammy, so the digest mail which contains it, will not be delivered.
So I suggest a remove of any<iframe>…</iframe>
in html mails.
The problem here is, that these messages are already rejected before delivering with error code 550. For example one of the biggest providers in Germany t-online does body checks like that. And when a requested a reason, then they told me, that it was because of this iframe. The same for one university here.MarkDHamill wrote: Mon Feb 20, 2017 3:09 amWhile I appreciate the suggestion, it is not practical for me to tailor the extension to optimally accommodate other extensions. Digests sometimes do end up in a spam folder regardless. The best solution to this (assuming GMail) is probably to add the sending email address as a contact or create a filter not to send these to spam.whocarez wrote: Sat Feb 18, 2017 12:45 pm @MarkDHamill thank you for your quick support!
Today I detected another issue that is linked to the s9e/mediaembeded extension.
If a post contains links embedded by this extension, for example a youtube video, than it renders it within an iframe. Iframes are in emails often considered as dangerous or spammy, so the digest mail which contains it, will not be delivered.
So I suggest a remove of any<iframe>…</iframe>
in html mails.
Code: Select all
host mx03.t-online.de[194.25.134.73] said: 550-5.7.0
Message considered as spam or virus, rejected 550-5.7.0
Code: Select all
host mail.rz.uni-passau.de[132.231.51.4] said:
550 dangerous.iframe id=151291::1487413554-00002A17-7CE8291A/7/0 (in reply
to end of DATA command)
<iframe>…</iframe>
in html mails.