Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.4k views
in Plugins by
edited by

I have not changed any configuration!
Maybe the notification is comming from 2 different sources, but I would like to stress that I am still developing in localhost. Is there a way to deal with this problem? It is quite strange to be notified twice.

Please see the image below (by the way, it seems the same issue happens in the figure presented in on-site-notifications):

Edit:

See repeated lines of the  the table eventlog:

2015-02-04 07:58:43     127.0.0.1     1     danielcajueiro     NULL    in_a_question     postid=16    parentid=4    parent=array(45)    content=Sugiro incluir na lista:  The Wal-Mart...    format=markdown    text=Sugiro incluir na lista: The Wal-Mart ...    categoryid=1    name=    notify=1    email=
2015-02-04 07:58:43     127.0.0.1     1     danielcajueiro     NULL    in_a_question     postid=16    parentid=4    parent=array(45)    content=Sugiro incluir na lista:  The Wal-Mart...    format=markdown    text=Sugiro incluir na lista: The Wal-Mart ...    categoryid=1    name=    notify=1    email=

Q2A version: 1.7.0
by
This smells like a copy/paste issue somewhere. Try to find out whether the notification is actually twice in the event logger table or if this is just some issue when generating the UI
by
edited by
In qa_event_log table, for instance, up vote events arise twice (for the user who posted the question), answers arise twice for the user who posted the question. This does not seem to affect the history plugin, because it does not consider the effect of other people's actions, which is different from the on-site-notifications. Where is this table created? Is it in function process_event in qa_event_loger?

1 Answer

+4 votes
by
selected by
 
Best answer

I don't know much about this plugin but I'm taking a look at this line: https://github.com/q2apro/q2apro-on-site-notifications/blob/master/q2apro-history-check.php#L143

In NoahY's history plugin, which is mentioned in that file, there is a similar line: https://github.com/NoahY/q2a-history/blob/master/qa-history-check.php#L102

So I guess you've installed both and they just aren't compatible because they are both doing the same thing (I told you it smelled to a copy/paste issue! :P).

As I said before, I don't know much about those plugins nor why they are inserting data to the event logger... that is something the core handles (related question: http://www.question2answer.org/qa/36034) but I guess they should have a good reason.

Anyway, I took a quick look at the code and it seems you can comment the code that inserts the record in that table in one of the plugins as the other one will add it anyway. That way you'll avoid the duplication. I'd do this in the NoahY's plugin as it is the one that seems less likely to be updated.

...