Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
774 views
in Plugins by
edited by
Event Logger plugin, v1.1
Q2A 1.6.2
 
The plugin is already included in the q2a installation.
 
I decided to NOT enable it initially, but to start first populating the q2a db (I've created a new q2a website) with some test questions and some test users (default privileges on registration).
 
As an admin, I decided, after a couple of days, to enable it to see how it works, and checked the "Log events to qa_eventlog database table" option.
After I saved the option, no qa_eventlog table was created in the mysql db. Why ?
 
After that, I decided to logout as an admin, and to login (same pc, but with another browser) as a normal user 
What happened ?
I received, logged in as a normal user, a web page saying : "The Event Logger event module requires some database initialization.", with a button saying : "Initialize database".
 
The user is responsible to initialize the db (!)
 
I could click on the button and I was able to initialize the database ("Running query: CREATE TABLE qa_eventlog ......", "The Event Logger event module has completed database initialization.")
At the bottom of the page there was also a link "Go to admin center"
(http://question2answer/index.php?qa=admin)
 
When I clicked, I could not go to the admin center  of course ("Only administrators may access this page") because I was logged in as a normal user (ok)
 
My question : is this a "design" bug ?
 
The admin enables the checkbox, and the first user who creates an event is responsible of initializing the database.
 
It sounds to me a wrong behavior this "lazy" initialization.
The initialization should happen immediately, when the admin save the options AND the option is flagged, in the same "logical" transaction of the insert/update in the options table.
 
Is this a bug ?
 
Q2A version: 1.6.2
by
sounds weird, indeed. I don't know if gidgreen has noticed your post. you should inform him with a short PN.
by
I added the "bug" tag, I hope that he filters the questions posted here with this tag sometimes :-)
I think he should use more advanced mechanisms to track issues, such as github issues...

Please log in or register to answer this question.

...