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

I've recently upgraded from 1.8.0-beta2 to 1.8.3. I upgraded the theme to Donut 2.0.1 (not sure what version I was using before but it was from Jan 2018). I also made the changes in the pull request for schema.org https://github.com/amiyasahu/Donut/pull/99.

Since then this has started happening when asking a question by a user that has enough points so the question DOES NOT go through moderation:

User enters the details in the question. Clicks on "Ask the Question".

This appears "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."

User presses refresh/reload on the browser.

This appears "Your submission appears to be a duplicate."

The question now exists in the questions list.

When asking a question by a user that does not have enough points so the question DOES go through moderation:

User enters the details in the question. Clicks on "Ask the Question".

This appears "Your question will be checked and approved shortly."

Admin clicks on "Approve" when moderating the question.

This appears "A database error occurred."

Admin clicks on "Approve" again.

This appears "A server error occurred - please try again."

The question now exists in the questions list.

The error I see in the SQL logs is (repeated for each new question):

[19-Jul-2019 04:20:03 CST6CDT] PHP Question2Answer MySQL query error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') as result' at line 1 - Query: SELECT  *  FROM  (  ) as result

Any clues what the problem may be? I can debug & try to get more details..

Thanks!

UPDATE: I think that the problem may have been triggered by an admin operation. Specifically, I changed the "Minimum length of question body" from 0 to 15.

Q2A version: 1.8.3

Please log in or register to answer this question.

...