- UBS Version
- 2.3.11
- XenForo Version
- 2.3.10
- PHP Version
- 8.3.30
- Database & Version
- MariaDB 10.11.14
- Are there any errors being throw?
- No
We are getting complaints from users that watched blog entry comment notifications don't work (especially for users who were the last to comment on a blog entry and didn't view the blog entry again after posting the comment).
Looking at the code it seems to me like the notifier loads the wrong read timestamps:
As far as I understand the code, this gets the timestaps for the blog entries, not for blog entry comments.
So shouldn't this be smth. like
instead?
Looking at the code it seems to me like the notifier loads the wrong read timestamps:
PHP:
$readDates = $db->fetchPairs("
SELECT user.user_id,
GREATEST(
COALESCE(blog_entry_read.blog_entry_read_date, 0),
?
)
FROM xf_user AS user
LEFT JOIN xf_xa_ubs_blog_entry_read AS blog_entry_read ON
(blog_entry_read.user_id = user.user_id AND blog_entry_read.blog_entry_id = ?)
WHERE user.user_id IN (" . $db->quote($userIds) . ")
", [$autoReadDate, $comment->blog_entry_id]);
As far as I understand the code, this gets the timestaps for the blog entries, not for blog entry comments.
So shouldn't this be smth. like
PHP:
$readDates = $db->fetchPairs("
SELECT user.user_id,
GREATEST(
COALESCE(blog_entry_comment_read.comment_read_date, 0),
?
)
FROM xf_user AS user
LEFT JOIN xf_xa_ubs_comment_read AS blog_entry_comment_read ON
(blog_entry_comment_read.user_id = user.user_id AND blog_entry_comment_read.blog_entry_id = ?)
WHERE user.user_id IN (" . $db->quote($userIds) . ")
", [$autoReadDate, $comment->blog_entry_id]);
Last edited: