• Resolved user9876789

    (@user9876789)


    On every product page I’m getting an error in the log. I updated to the latest version today. I rolled back to 4.3.0 but the warning still happens on every product page load. Do you have any ideas how I can resolve this?

    "PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1
    
                    )
    
                    AND
    
                    (
    
      ...' at line 5 for query 
    
                SELECT blocks.id
    
                FROM xxx_yith_wapo_blocks as blocks
    
                WHERE
    
                    (
    
                        visibility IN 1
    
                    )
    
                    AND
    
                    (
    
                        id IN (
    
                                SELECT id FROM xxx_yith_wapo_blocks
    
                                WHERE vendor_id IN ('0')
    
                            )
    
                    )
    
                    AND
    
                    (
    
                        (
    
                            id IN (
    
                                SELECT id FROM xxx_yith_wapo_blocks
    
                                WHERE product_association = 'all'
    
                            )
    
                            OR
    
                            id IN (" while reading upstream
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    I tried to replicate the issue you mentioned in my local site with the latest version of the plugin, and it worked correctly.

    So I suggest you try disabling all the plugins except for WooCommerce and our plugin and then check if the issue is solved.

    If it’s solved, then you will need to re-enable the plugins, one at the time, until you find the one causing the issue.

    We’ll remain at your disposal.

    Thread Starter user9876789

    (@user9876789)

    Thank you for testing, I have now found the cause. In case this helps someone else, the issue was happening on our dev site too so I installed Query Monitor there – it showed the database error, I expanded YITH_WAPO_DB->yith_wapo_get_blocks_by_product() to list out all the path it was taking and it listed a Woo plugin in there. When I disabled that and refreshed the error was gone. I will speak with those plugin developers.

    Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,

    thank you for reaching-out the cause of the issue and share the information with us.

    Have a nice day.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘SQL error in logs’ is closed to new replies.