tiki-wiki


Tikiwiki version 15.3 There is no email sent when user setup forum thread watch


I am using tiki version 15.3
I setup my preference that if there is a new forum thread that I am an editor, I will receive an email notification in "My Watches". However, I haven't received any email. It works for blog and new user registration though. So no problem with the email setup. As I debug the code, I found a few problem in the code:
In File: /lib/notification/notificationemaillib.php
Line: 112
$nots_raw = $tikilib->get_event_watches($event, $event == 'forum_post_topic'? $forum_info['forumId']: $threadId, $forum_info);
Should the $threadId is the $parentId? Since the Tiki_user_Watch table store the Thread Parent Id not the newly created threadId.
Secondly,
In line 122:
foreach ( $nots_raw as $n ) {
if ($n['user'] != $author
&& !in_array($n['user'], $users)) {
// make sure user receive only one notification even if he is monitoring both the topic and thread
$n['language'] = $tikilib->get_user_preference($n['user'], "language", $defaultLanguage);
$nots[] = $n;
$users[] = $n['user'];
}
There is no else for this if clause. I understand this condition is to send only 1 email when user monitor both thread and topic. However, I am monitoring only 1 of them, I think there should be an"
else{ $nots[] = $n;}
This way the $nots will have something to send email in the later part of the code.
if (count($nots)) {
include_once('lib/webmail/tikimaillib.php');
$smarty->assign('mail_forum', $forum_info["name"]);...
Please advise if I am wrong.
You are correct. I believe I have fixed it with this commit, which will be in the next release of version 15 (also committed to version 16, 17 and trunk).
The parent ID needed to be used instead of the thread ID as you pointed out (thanks for that - made it much easier with most of the debugging already done!). There was also an issue with identifying the existing watches properly. I don't think the if statement needs an else, but let me know if this doesn't fix it for you.

Related Links

Tikiwiki 16.2 Error while registering new user
Tikiwiki version 15.3 There is no email sent when user setup forum thread watch
Tiki Wiki CustomSearch destdiv parameter
How can I decide what fields are shown in the user registration form using the user tracker? - Tiki
tiki-wiki: How to copy a structure into another Or how to duplicate a structure
error in tables while ugprading database
tiki-wiki: how do i force newly created pages into a category based on the user's group?
Limit page creation
TIKI Custom menu no any CSS applied
Embed content from another TikiWiki page into current page
tiki-wiki: How to create a tree view category structure?
tiki-wiki: How to batch import categorized articles from a CSV file
Using LDAP on Tiki-Wiki

Categories

HOME
kentico
porting
spark-streaming
polymer
c++11
c99
fpga
gpu
jelastic
socket.io
alsa
cq5
big-o
onclick
zip
character
joomla3.0
mql5
little-proxy
x-cart
ipmitool
endpoint
intercom
docx
libusb
glyphicons
searchview
dreamweaver
android-7.0-nougat
wolframalpha
imessage
database-connection
pagespeed
comparator
gmock
mount
tiki-wiki
maze
linked-data
bringtofront
google-cast
aws-codecommit
anki
kodi
fstream
linkedhashmap
classcastexception
carriage-return
lint
dm-script
modernizr
sharp-snmp
xbmc
openal
lampp
jquery-ui-draggable
dotnet-httpclient
yii2-api
aquamacs
edit
monkey
flyout
grails-plugin
segment-io
synonym
vorpal.js
udpclient
appscale
ikiwiki
yajsw
contentcontrol
phpgrid
dynamics-nav-2016
roadkill-wiki
amiga
skspritenode
jsvc
mraid
dot.js
cross-join
jbake
sbcl
cocoalibspotify-2.0
asdf
time.h
facebook-timeline
zope.interface
dajaxice
subgraph
httponly
urlrewriter
role
google-floodlight
twitterizer
drupal-fivestar
dot-emacs
hbm2java
silverlight-oob
lalr
entitykey
mathematical-typesetting
netbeans6.1

Resources

Encrypt Message