Notification Mail mixed up

Please report bugs here!

Moderator: Thorsten

Post Reply
Toni
Posts: 9
Joined: Mon Jan 18, 2016 4:27 pm

Notification Mail mixed up

Post by Toni » Mon Jan 18, 2016 4:59 pm

Hi,

first of all i want to say thanks for this great piece of software.
I'm using latest stable 2.8.25.

My problem was described earlier in this thread: viewtopic.php?f=2&t=14845&hilit=category+owner
As it is nearly 3 years old my assumption was that this bug is fixed.
My case is slighty different: mails as a reply of new FAQ request are sent to the Administrator everytime, but mixing up the category owner. It means that sometimes mail is not sent, sometimes the category_owner is wrong and the notification is sent to a different user which isn't the owner, and sometimes it works as expected.
The behaviour of a single category doesn't change. If category A is configured with user A then always user B receives a notification mail. Changing the category owner to user C doesnt't change anything. Still user B receives a notfication instead of user A.

I've activated general log in mysql, and see the id of user B but could not verify which sql statement is responsible to took the wrong user_id. Same problem on cases where only the admin is notified.
php debug log gives me this:

Code: Select all

Undefined offset: 16 in /var/www/ebfaq/inc/PMF/Category.php on line 979, referer: https://kb.[i]mydomain.de[/i]/index.php?action=add&cat=0


Can you give me some hint, why on some categories a different owner receives mail, on some other categories no user is notfied and on the third case no category owner receives mail?

btw.: I've resetted my installation and start from scratch. The behaviour is the same but with different constellations.

Thanks in advance
Toni

Thorsten
Posts: 14792
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Notification Mail mixed up

Post by Thorsten » Mon Jan 18, 2016 8:22 pm

Hi,

I finxed the bug the undefined offset: https://github.com/thorsten/phpMyFAQ/co ... 1e64094eb9

About the mails after checking the code:
  • for comments, the category owne receives the same mail like the admin
  • for new FAQs, the category owne receives the same mail like the admin
  • for new questions, the category owne receives the same mail like the admin
I will do some tests the next days what's happening here.

Thanks!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Toni
Posts: 9
Joined: Mon Jan 18, 2016 4:27 pm

Re: Notification Mail mixed up

Post by Toni » Mon Jan 18, 2016 10:58 pm

Thanks for your quick reply!
About the mails after checking the code:
  • for comments, the category owne receives the same mail like the admin
  • for new FAQs, the category owne receives the same mail like the admin
  • for new questions, the category owne receives the same mail like the admin
i'm sorry, i didnt get that :( Is there something different compared to the former expected behaviour?

I've changed Category.php like you have described. Currently the admin and the user, which has the id i'm entering in row 984

Code: Select all

+            return 1;
receives a notification mail. Except for an unbroken category, which sends an email to the correct category owner +admin, of course.
As far as i understand the php code, this was your intention, right?

bye
Toni

Thorsten
Posts: 14792
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Notification Mail mixed up

Post by Thorsten » Wed Jan 20, 2016 7:20 pm

Hi,

that's right. The admin and the category owner always get the same e-mail. As a fallback, only the admin receives an e-mail.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Toni
Posts: 9
Joined: Mon Jan 18, 2016 4:27 pm

Re: Notification Mail mixed up

Post by Toni » Fri Feb 12, 2016 11:04 am

any news on this case?

regards
Toni

Thorsten
Posts: 14792
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Notification Mail mixed up

Post by Thorsten » Fri Feb 12, 2016 8:19 pm

Hi,

please re-test with 2.8.26

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Toni
Posts: 9
Joined: Mon Jan 18, 2016 4:27 pm

Re: Notification Mail mixed up

Post by Toni » Tue Feb 16, 2016 3:14 pm

same behaviour after updating to 2.8.26.
There is still an error in detecting the category owner.

bye
Toni

Thorsten
Posts: 14792
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Notification Mail mixed up

Post by Thorsten » Tue Feb 16, 2016 8:03 pm

HI Toni,

is it possible to get a database dump to check it on your data?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Toni
Posts: 9
Joined: Mon Jan 18, 2016 4:27 pm

Re: Notification Mail mixed up

Post by Toni » Thu Feb 18, 2016 11:32 am

I'm sorry, can't do that. It's confidential data.
Is this working on yours or in other installations?

regards
Toni

Thorsten
Posts: 14792
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Notification Mail mixed up

Post by Thorsten » Thu Feb 18, 2016 12:30 pm

Hi,

will try to reproduce it.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Thorsten
Posts: 14792
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Notification Mail mixed up

Post by Thorsten » Sat Mar 05, 2016 10:57 pm

Hi,

finally found the issue, here's the commit that fixes this issues: https://github.com/thorsten/phpMyFAQ/co ... a4741fe6ac

I'll prepare 2.8.27 and 2.9.0-RC for the next days.

Thanks!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Toni
Posts: 9
Joined: Mon Jan 18, 2016 4:27 pm

Re: Notification Mail mixed up

Post by Toni » Fri May 20, 2016 10:35 am

Sorry for my late response...didn't get any forum notfication about a new post...

Find out independently that v2.9 works.
Great work!

btw: have some other issue posted here viewtopic.php?f=2&t=19366

Post Reply