• Resolved opicron

    (@opicron)


    When using the newest version 2.9.3 I get the following error on Query Monitor twice:

    Database Errors
    1)Query
    2)Caller
    3)Component
    4)Error Message
    5)Error Code

    1)DESCRIBE IF;
    2)Unknown
    3)Unknown
    4)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 ‘IF’ at line 1
    5)qmdb

    When I roll back to the previous version there is no error.

Viewing 15 replies - 1 through 15 (of 18 total)
  • ituk

    (@ituk)

    Thread Starter opicron

    (@opicron)

    In the end i removed the create table f function calls from the plugin. Case solved.

    I did check the old version and this version differences in that particular functions. There are none, but instead of debugging this myself I leave it to the dev.

    ituk

    (@ituk)

    in which file?

    still not solved ??

    commented out lines 186 and 188 in sendinblue.php file ..

    // create forms tables and create default form.
    /* SIB_Forms::createTable(); */
    // create users table.
    /* SIB_Model_Users::createTable(); */

    I’m seeing this too. I guess we’re waiting for an update and fix from SendinBlue?

    Thread Starter opicron

    (@opicron)

    SendInBlue is blaming Query Monitor. Which in principle might be correct because the sql did not change in between this and the old version. It is quite odd..

    Plugin Author Brevo

    (@neeraj_slit)

    Hello,

    Thank you for reporting the error you have faced.
    Our team is taking it into account for our next release!

    Regards,

    Hi

    I have also this error. Is this error the same?
    You can see a screenshot here : https://ibb.co/g3c908H

    Because the last message is from 1 month ago , i’m asking if this update has stil have to come?
    Thanks

    Thread Starter opicron

    (@opicron)

    The update has indeed yet to come. ??

    I got this to work by using $wpdb->query($creation_query) instead of dbDelta($creation_query) in the files below:

    /plugins/mailin/model/model-forms.php:56
    /plugins/mailin/model/model-users.php:44
    /plugins/mailin/model/model-lang.php:32

    Seems there’s an issue with the syntax of the SQL statement around “CREATE TABLE IF NOT EXISTS” as the dbDelta() function will interpret “IF” as the table name which throws everything off.

    Hope this helps someone!

    Thanks solargard, this helped me with other plugins too. Seems like dbDelta is not very helpful or is misused..

    Still, we had an update for the plugin and this bug wasn’t fixed, so I had to fix it by myself again ..

    @neeraj_slit the issue is still applies after plugin update – what shall we do?

    Thread Starter opicron

    (@opicron)

    I refrain from updating until this id adressed.

    I installed this plugin yesterday (Version: 2.9.4) and also discovered this error thanks to Query Monitor; I investigated my MariaDB tables and all was ok despite the error notice.

    Because error notice every time page loads (and small panic-attack sets in) I used solution provided by @solargard after the installation+investigation.
    $wpdb->query($creation_query); // dbDelta( $creation_query );
    Checking my DB again, all is still good to go, plus no more red error notices now.
    (I have not dropped tables to test if this solution works on its own – please report attempts.)

    I wonder why this error is triggered on every page load though?.. surely createTable() functions are only needed during first install activation and on plugin updates though? (I do not have time to investigate this, please report/update as necessary.)

    • This reply was modified 5 years, 7 months ago by convers.

    2.9.5 is out and the issue is still not fixed. Again, need to modify plugin to fix the issue. Can’t you implement the fix in the plugin? You have the solution here so why is this still reappearing in the plugin?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Database error with Query Monitor “DESCRIBE IF;”’ is closed to new replies.