• Hello,

    i would like to use the plugin, but unfortunatly i can′t save the questions. I have two wordpress-sites, but i don′t run them as multisites, i have two wordpress-installations on my server.

    When i try to save a question i get an error in the apache error-log: error in SQL syntax near ‘rank=0, title=’test’ ….

    I use the latest wordpress and plugin version.

    Can you please help me with this problem?

    Best regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Bob

    (@prasunsen)

    I can’t see why you would be getting error. Is the whole query shown in the log?

    Thread Starter cyberflo

    (@cyberflo)

    Hello, thanks for your quick reply,

    sorry i have not copied the complete error message because i don′t know if the error message contains private details from the server etc.

    Here is the complete error message from the apache error log:

    [Wed May 13 10:30:59 2020] [notice] WordPress-Datenbank-Fehler 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 ‘rank=0, title=’Test’, autocontinue=0, sort_order=1, \n\t\t\taccept_comments=0, accep’ at line 2 f\xc3\xbcr Abfrage INSERT INTO gowp_chained_questions SET\n\t\t\tquiz_id=1, question=’Test text’, qtype=’checkbox’, rank=0, title=’Test’, autocontinue=0, sort_order=1, \n\t\t\taccept_comments=0, accept_comments_label=’Your comments:’ von do_action(‘admin_page_chainedquiz_questions’), WP_Hook->do_action, WP_Hook->apply_filters, ChainedQuizQuestions::manage, ChainedQuizQuestions::add_question, ChainedQuizQuestion->add

    If there are any details, that should not be public please tell me about it and i remove the details.

    Thanks for your help!

    Plugin Author Bob

    (@prasunsen)

    Sorry, absolutely no idea why the query is causing error except maybe these characters that show up: “\n\t\t\t”.

    Thread Starter cyberflo

    (@cyberflo)

    Hello,
    thank you for your reply.

    I have searched a lot (and unfortunatly i don′t know much about mySQL or the syntax), but i have not found a solution. These characters \n\t\t\t are only new line and tabulator that is in your plugin code. Is it unusual that these characters show up in the apache error log?
    I dont know, if this could be because the website and wordpress is in german? Maybe there are any false character sets with the mySQL database?

    I use mySQL 8.0.15
    PHP 7.3
    Wordpress 5.4.1
    This is no multisite
    mySQL uses utf8mb4

    Have you a hint for me?
    Is it ok for you, if i post this error (with the function of code the error shows) on stackoverflow or so, perhaps i can get there a hint for a solution?

    Is there anything i can change on the database to solve the problem?

    Thank you for your help!

    Best regards

    Plugin Author Bob

    (@prasunsen)

    Yes, you can post it to stackoverflow.
    Unfortunately I have no idea what’s wrong. We have users in many languages, there are no language specific problems.

    Thread Starter cyberflo

    (@cyberflo)

    Hello,
    i think i found the syntax “error”.

    rank() is a function in SQL ( new in version 8), as you can read here . So the plugin would work with a different name than rank for the question rank.

    I hope I’m not too brazen when I ask you if you could change the name ‘rank’? Or has it been possible by the license that I change only in my installation? And if i can change it on my installation is there any other problem that a new name for ‘rank’ could cause?

    p.s.: I have not posted to stackoverflow.

    Thanks again and best regards

    Thread Starter cyberflo

    (@cyberflo)

    Hello,
    if I change the name “rank” to another name, could there be other problems? I would rename the name in basic.php and question.php before activating the plugin.
    Should this be possible without any problems?

    Best Regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Question not saved’ is closed to new replies.