New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error with guest posts & external database integration #244
Comments
When using external users, you can't violate a constraint that is only created when using internal users... unless you've created the tables using internal users and then switched to external. If you could start from scratch that would be probably the best way to go. If it is already too late you can take a look at this function to see what are the operations you'll need to undo. |
I think for external users on donut theme, the following is required in qa-donut-utils.php
|
Sounds like this is a problem with an external theme, so you should suggest your fix to the author of that theme. |
The following happens with you are using an external user database, allow guest questions and ask a question with the same name as an existing users:
[Sun May 24 20:18:09 2015] [error] [client 149.126.78.65] PHP Question2Answer MySQL query error 1452: Cannot add or update a child row: a foreign key constraint fails (
qanda
.qa_posts
, CONSTRAINTqa_posts_ibfk_1
FOREIGN KEY (userid
) REFERENCESqa_users
(userid
) ON DELETE SET NULL) - Query: INSERT INTO qa_posts (categoryid, type, parentid, userid, cookieid, createip, title, content, format, tags, notify, name, created) VALUES (8, 'Q', NULL, '508815', NULL, INET_ATON('\0\0\0\0\0\0\0\0\0\0\0\0]\x86\xf3U'), 'This ijust a qeustion from real me', 'what happens if someone else asks in my name?', '', 'question', '@', NULL, NOW()),The text was updated successfully, but these errors were encountered: