• Resolved louagej

    (@louagej)


    Hi,
    After installing and activating the latest version of Smart Grid-Layout Design for Contact Form 7, I receive an error in the admin panel on the pages, posts and plugin page:
    Fatal error: Uncaught mysqli_sql_exception: 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 'WHERE p.post_type = 'wpcf7_contact_form' AND pm.meta_key = '_cf7sg_ver' at line 5 in /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-includes/wp-db.php:2056 Stack trace: #0 /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-includes/wp-db.php(2056): mysqli_query(Object(mysqli), 'SELECT pm.meta_...') #1 /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-includes/wp-db.php(1945): wpdb->_do_query('SELECT pm.meta_...') #2 /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-includes/wp-db.php(2657): wpdb->query('SELECT pm.meta_...') #3 /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-content/plugins/cf7-grid-layout/admin/class-cf7-grid-layout-admin.php(1748): wpdb->get_col('SELECT pm.meta_...') #4 /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-includes/class-wp-hook.php(303): Cf7_Grid_Layout_Admin->init_notices('') #5 /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #6 /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #7 /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-admin/admin.php(175): do_action('admin_init') #8 /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-admin/plugins.php(10): require_once('/srv/disk4/2976...') #9 {main} thrown in /srv/disk4/2976396/www/lafermeoubliee.louage.org/wp-includes/wp-db.php on line 2056

    With the previous version (4.11) I didn’t have this problem.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    no changes to the SQL queries have been done since v4.11.

    Can you please run the following SQL command on your DB (using phpMyAdmin if you have),

    
    SELECT pm.meta_value FROM wp_postmeta as pm
              INNER JOIN wp_posts as p on p.ID = pm.post_id LEFT JOIN wp_postmeta as pmf on pmf.post_id = pm.post_id
              WHERE pmf.meta_key = '_cf7sg_managed_form'
              AND pmf.meta_value = 1
              WHERE p.post_type = 'wpcf7_constact_form'
              AND pm.meta_key = '_cf7sg_version'
              ORDER BY pm.meta_key
    

    and see what the DB complains about

    Thread Starter louagej

    (@louagej)

    Hi Aurovrata,

    I receive this message:
    #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 ‘& AND pmf.meta_value = 1 LIMIT 0, 25’ at line 3

    Plugin Author Aurovrata Venet

    (@aurovrata)

    ok, I just ran it on my server and there is indeed a problem. Let me check and get back to you.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    can you please test this query on your DB,

    SELECT pm.meta_value FROM wp_postmeta as pm
              INNER JOIN wp_posts as p on p.ID = pm.post_id INNER JOIN wp_postmeta as pmf on pmf.post_id = pm.post_id
              WHERE pmf.meta_key = '_cf7sg_managed_form'
              AND pmf.meta_value = 1
              AND p.post_type = 'wpcf7_contact_form'
              AND pm.meta_key = '_cf7sg_version'
    
    Thread Starter louagej

    (@louagej)

    Hi,

    this query results in:

    • 4.12.7
    • 4.12.7
    • 4.12.7
    • 4.12.7
    • This reply was modified 3 years, 2 months ago by louagej.
    • This reply was modified 3 years, 2 months ago by louagej.
    Plugin Author Aurovrata Venet

    (@aurovrata)

    good good. I am releasing v4.12.10 with the SQL fix.

    Thread Starter louagej

    (@louagej)

    Thank you already.
    I tried to add some Dutch translation to the plugin.
    I hope this is a little help.

    Thread Starter louagej

    (@louagej)

    Installed version v4.12.10
    The problem is solved, thank you!

    Plugin Author Aurovrata Venet

    (@aurovrata)

    great, glad that works now. Thanks for reporting this.

    I tried to add some Dutch translation to the plugin.
    I hope this is a little help.

    wonderful thank you!

    Do leave a review when you have a moment to spare.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Fatal error: Uncaught mysqli_sql_exception’ is closed to new replies.