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

Hi everyone,

 

i keep getting this message with the on-site notifation plug in:

 

The q2apro On-Site-Notifications Admin module module requires some database initialization

 

i have intilaztied the database and checked it has created the table in SQL which it has no idea how to fix this ?

 

any ideas or help much appreciated , this is my first website ever :)

Q2A version: 1.6.3

1 Answer

+1 vote
by
Make sure the table Q2Aacco_eventlog has been created in your database.

Another way to overcome this error: Go to admin/plugins, click on options of the "Event Logger", activate "Log events to qa_eventlog database table". This will do it.
by
Thanks for getting back to me.

Log events to Q2Aacco_eventlog database table - is selected

and that table has been created in the database with the corresponding column names..

If i click itialize again it states :

"The q2apro On-Site-Notifications Admin module module has completed database initialization."

but the message keeps appearing under admin > plugins in a big red banner and will not go away + interferes with installing other adds on

Any other help is appreciated
by
1. If you remove the plugin, does the initialize message disappear?
2. It could also be a bug* of the q2a core as I remember, you are having a capitalized prefix "Q2Aacco_" which could cause the problem. To fix this, open q2apro-onsitenotifications-admin.php, change line 31 from "$tablename = qa_db_add_table_prefix('eventlog');" to "$tablename = strtolower(qa_db_add_table_prefix('eventlog'));"
3. If this does not help, add after line 29 "function init_queries($tableslc) {" this line: $tableslc = strtolower($tableslc);

* https://github.com/q2a/question2answer/issues/45
by
Brilliant thanks point 2 fixed the initial problem  .

now i am getting: The Event Logger event module requires some database initialization.

But when i "intialization" it i am getting the below error even though the SQL user has these permissions assigned?



If i remove the "event-logged" out of the plugin directory it works

Running query: CREATE TABLE Q2Aacco_eventlog (datetime DATETIME NOT NULL,ipaddress VARCHAR (15) CHARACTER SET ascii,userid INT UNSIGNED,handle VARCHAR(20),cookieid BIGINT UNSIGNED,event VARCHAR (20) CHARACTER SET ascii NOT NULL,params VARCHAR (800) NOT NULL,KEY datetime (datetime),KEY ipaddress (ipaddress),KEY userid (userid),KEY event (event)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ...

Question2Answer was unable to perform the installation query below. Please check the user in the config file has CREATE and ALTER permissions:

CREATE TABLE Q2Aacco_eventlog (datetime DATETIME NOT NULL,ipaddress VARCHAR (15) CHARACTER SET ascii,userid INT UNSIGNED,handle VARCHAR(20),cookieid BIGINT UNSIGNED,event VARCHAR (20) CHARACTER SET ascii NOT NULL,params VARCHAR (800) NOT NULL,KEY datetime (datetime),KEY ipaddress (ipaddress),KEY userid (userid),KEY event (event)) ENGINE=MyISAM DEFAULT CHARSET=utf8

Error 1050: Table 'Q2Aacco_eventlog' already exists


Thanks for all your help!!
by
Okay, let's make it easy for your case:
→ Remove the entire function init_queries($tableslc) block. The table has been created already as far as I understood.
by
if i delete line 21-62 i can not get into admin > plugin it loads  a blank page?
by
edited by
Just delete the inner, and leave function init_queries($tableslc) {}

PS: This bug will be fixed with the new question2answer version: https://github.com/q2a/question2answer/issues/45#issuecomment-53973988
by
thanks for all your help you have been great will have a try in a little while
...