Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
4.4k views
in Q2A Core by
edited by

i'm using Q2A with sigle sign on feature. It is working for admin user.  but i am getting the following error while posting, commenting and voting by other  users.

 

A Question2Answer database query failed when generating this page.

A full description of the failure is available in the web server's error log file.

 

 It is working fine without single sign on.

Q2A version: 1.6.3
by
yes.. there is no statements
by
Does it show the SQL error if you have the setting QA_DEBUG_PERFORMANCE set to true in qa-config.php?
by
it shows the following  error in php_error_log file :

PHP Question2Answer MySQL query error 1452: Cannot add or update a child row: a foreign key constraint fails (`q2a`.`qa_userfavorites`, CONSTRAINT `qa_userfavorites_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `qa_users` (`userid`) ON DELETE CASCADE) - Query: INSERT IGNORE INTO qa_userfavorites (userid, entitytype, entityid, nouserevents) VALUES ('2', 'Q', 5, 0)
by
Thank you so much Scott and maxjtechno.  

i changed all foreign key reference as shared users table key. Now it is working fine.

Please log in or register to answer this question.

...