Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

1.2 Beta 1 external users error

+1 vote
I've linked Q2A to an external user database using the methods in the advanced install instructions. User login is recognized. However, whenever I try to post a question, I get this error:

Question2Answer query failed:

INSERT INTO qa_posts (categoryid, type, parentid, userid, cookieid, createip, title, content, tags, notify, created) VALUES (NULL, _utf8 'A', 1, _utf8 '2', NULL, INET_ATON(_utf8 '61.51.76.176'), NULL, _utf8 'this is a test', NULL, NULL, NOW())

Error 1364: Field 'acount' doesn't have a default value
asked Jun 30, 2010 in Q2A Core by Henry
Henry,
Can you please post your qa-external-users.php file here.I need some information.

1 Answer

0 votes
This is happening because your MySQL installation is using something called 'strict mode' which insists on every column either being set when a row is created, or having an explicit default value.

This is clearly a problem and I'll change the release of version 1.2 of Q2A so that it is compatible with strict mode. In the meantime, you can change the database schema (via ALTER TABLE) to explicitly set a default of 0 (zero) for the acount column, or else change your configuration to switch 'strict mode' off.

It's quite possible this will affect some other queries too.
answered Jun 30, 2010 by gidgreen
I can confirm that every combination of Q2A version, WordPress version, and browser work fine on a JustHost server. There is a problem with FireFox on a BlueHost server with both the latest production release and the 1.2beta Q2A, though it does work with MSIE.

I'll see what BlueHost have to say.

[Later  - BlueHost are no help. Also, I've changed my mind on JustHost - technically they are OK, but their shared hosting scheme is not suitable for much more than a couple of hundred users, and they don't do dedicated. So far so good with DreamHost (and with NativeSpace in the UK).]
@gidgreen, ok scratch what I said, it appears that setting all the default values for any of the *count variables to 0 does get it to work. Reason this happened to me was because I was using the WP-United plugin with wordpress which accesses wp_users as well.