• I’ve recently noticed this error message on the top of my homepage – i’ve not done any development, am up to date with my version upgrades, and generally just upload stock via the imp/exp app

    Any suggestions on where to start?

    WordPress database error: [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 meta_key LIKE ‘attribute\\_%” at line 1]
    SELECT post_id as variation_id, meta_key as attribute_key, meta_value as attribute_value FROM wp_postmeta WHERE post_id IN () AND meta_key LIKE ‘attribute\\_%’

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • This is likley coming from one of your WooCommerce plugins since it is referencing variation and attribute.

    You’ll need to deactivate your plugins, and then activate them back on one-by-one.

    Also activate a default WordPress theme.
    If the error is coming from your Electro theme, then you will need to ask their support:
    https://themeforest.net/item/electro-electronics-store-woocommerce-theme/15720624

    Thread Starter netdiscs

    (@netdiscs)

    Hi @corrinarusso

    Thanks for the advice.

    The error comes up when i activate WooCommerce

    not sure what you mean by “activate a default WordPress theme” – i have a theme installed and activated, but setting a default I’m not sure. I’ve read about this numerous times, but never found anything on google that goes beyond choosing / installing and activating.

    Is activating a default something different?

    I don’t know where to take this error to fix it:

    wordpress
    woocommerce
    theme supplier
    something else?

    • This reply was modified 4 years, 4 months ago by netdiscs.
    Thread Starter netdiscs

    (@netdiscs)

    I’ve set debug to false in the WP-Config file, and that’s done the trick

    but can’t help but feel the error was telling me there’s a problem – and i’ve just hidden it

    Correct – debug set to false only removes the site from displaying the error on the frontend. The error will continue to log in the log file.

    Download this theme:
    https://en-ca.ww.wp.xz.cn/themes/twentytwentyone/
    and Activate it, and see if the error remains.
    https://10web.io/blog/wordpress-default-theme/#:~:text=If%20you%20want%20to%20change,click%20Install%20and%20then%20Activate.

    Thread Starter netdiscs

    (@netdiscs)

    Thanks for that!

    changed the config file to true, so should see errors
    downloaded, installed and activated the theme
    Didnt see any errors

    activated the normal theme…. no errors.

    thanks for the link to Default – so, activating a theme is setting a default? I’d expect a “Set as default” button or similar…. unless I’m misunderstanding what a default it.

    • This reply was modified 4 years, 4 months ago by netdiscs.

    > activating a theme is setting a default?

    Correct.

    Seems to have resolved itself then?

    Thread Starter netdiscs

    (@netdiscs)

    it appears so!

    thanks for your help – answered the question about defaults if nothing else
    🙂

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

The topic ‘WordPress database error’ is closed to new replies.