• jinxuetan

    (@jinxuetan)


    This issue happened when trying to filter by stock status on the admin all product page, and it returned wrong result. This action also causes the entire shop order on frontend gone missing.

    Below is the error found:

    wp_postmeta.meta_value = ‘yes’ ) OR ( wp_postmeta.meta_key = ‘_wpro_variable_is_preorder’ AND wp_postmeta.meta_value = ‘yes’ ) AND ( ( wp_postmeta.meta_key = ‘_elementor_template_type’ AND wp_postmeta.meta_value = ‘landing-page’ ) ) AND wp_posts.post_type = ‘e-landing-page’ AND ((wp_posts.post_status <> ‘trash’ AND wp_posts.post_status <> ‘auto-draft’ AND wp_posts.post_status <> ‘expired’)) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 1

    WordPress database error: [Not unique table/alias: ‘wp_postmeta’]
    SELECT wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1 AND ( wp_postmeta.meta_key = ‘_simple_preorder’ AND wp_postmeta.meta_value = ‘yes’ ) OR ( wp_postmeta.meta_key = ‘_wpro_variable_is_preorder’ AND wp_postmeta.meta_value = ‘yes’ ) AND ( ( wp_postmeta.meta_key = ‘_elementor_template_type’ AND wp_postmeta.meta_value = ‘floating-buttons’ ) ) AND wp_posts.post_type = ‘e-floating-buttons’ AND ((wp_posts.post_status <> ‘trash’ AND wp_posts.post_status <> ‘auto-draft’ AND wp_posts.post_status <> ‘expired’)) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 1

    WordPress database error: [Not unique table/alias: ‘wp_postmeta’]
    SELECT wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1 AND ( wp_postmeta.meta_key = ‘_simple_preorder’ AND wp_postmeta.meta_value = ‘yes’ ) OR ( wp_postmeta.meta_key = ‘_wpro_variable_is_preorder’ AND wp_postmeta.meta_value = ‘yes’ ) AND ( wp_postmeta.meta_key = ‘berocket_post_order’ ) AND wp_posts.post_type = ‘br_labels’ AND ((wp_posts.post_status = ‘publish’)) GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value+0 ASC

Viewing 1 replies (of 1 total)
  • Plugin Support angelagrey

    (@angelagrey)

    Hi,

    Thank you for reaching out to us.

    I’m unable to replicate this problem on my site: https://snipboard.io/dWFmyL.jpg

    However, it seems there’s a conflict with a 3rd plugin, as I noticed some strange queries were added, like wp_posts.post_status <> ‘expired’

    Perhaps you’re using a second plugin which has pre order feature? Could you try a conflict test following these steps: https://docs.woocommerce.com/document/woocommerce-self-service-guide/

    It could be possible that a theme or plugin conflict is causing this behavior.

    If you don’t want to perform these tests on the live site, I would recommend reaching out to your web host to see if they offer a staging site as part of your hosting package. If not, then I’d recommend using the WP Staging plugin to duplicate the site.

    Let us know how this goes!

    Best regards.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.