{"id":12778958,"date":"2020-05-04T15:56:06","date_gmt":"2020-05-04T15:56:06","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-error-causing-timeout\/"},"modified":"2020-05-04T15:56:06","modified_gmt":"2020-05-04T15:56:06","slug":"php-error-causing-timeout","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-error-causing-timeout\/","title":{"rendered":"php error causing timeout"},"content":{"rendered":"<p>i have a php error, deactivating your plugin stops this from happening. the error occurs when trying to update a post or product. when clicking the update button after editing the post, the website times out. the error from the log is:<\/p>\n<pre><code>[04-May-2020 13:00:02 UTC] WordPress database error Table &#039;mandeel7_wp339.wp_posts&#039; doesn&#039;t exist for query SELECT ID, coupon_code, usage_limit, total_usaged, expiry_date FROM (\n\t\t\t    SELECT p.ID, \n\t\t\t    p.post_title AS coupon_code, \t\n\t\t\t    Max(CASE WHEN pm.meta_key = &#039;date_expires&#039;    AND  p.&lt;code&gt;ID&lt;\/code&gt; = pm.&lt;code&gt;post_id&lt;\/code&gt; THEN pm.meta_value END) AS expiry_date,                       \n\t\t\t    Max(CASE WHEN pm.meta_key = &#039;usage_limit&#039;     AND  p.&lt;code&gt;ID&lt;\/code&gt; = pm.&lt;code&gt;post_id&lt;\/code&gt; THEN pm.meta_value END) AS usage_limit,                \n\t\t\t    Max(CASE WHEN pm.meta_key = &#039;usage_count&#039;     AND  p.&lt;code&gt;ID&lt;\/code&gt; = pm.&lt;code&gt;post_id&lt;\/code&gt; THEN pm.meta_value END) AS total_usaged,\n\n\t\t\t    Max(CASE WHEN pm.meta_key = &#039;coupon_generated_by&#039;     AND  p.&lt;code&gt;ID&lt;\/code&gt; = pm.&lt;code&gt;post_id&lt;\/code&gt; THEN pm.meta_value END) AS coupon_generated_by\n\t\t\t    FROM   wp_posts AS p \n\t\t\t    INNER JOIN wp_postmeta AS pm ON  p.ID = pm.post_id \n\t\t\t\tWHERE  p.&lt;code&gt;post_type&lt;\/code&gt; = &#039;shop_coupon&#039;     \n       \n\t\t  \t\tGROUP BY p.ID\n \t\t\t) AS final_res WHERE coupon_generated_by IS NOT NULL AND coupon_generated_by = &#039;woo-cart-abandonment-recovery&#039; AND ( ( usage_limit = total_usaged ) OR ( expiry_date &lt;= 1588597202 AND expiry_date != &#039;&#039;) ) made by do_action_ref_array(&#039;cartflows_ca_update_order_status_action&#039;), WP_Hook-&gt;do_action, WP_Hook-&gt;apply_filters, Cartflows_Ca_Cart_Abandonment-&gt;update_order_status, Cartflows_Ca_Cart_Abandonment-&gt;delete_used_and_expired_coupons, Cartflows_Ca_Cart_Abandonment-&gt;delete_garbage_coupons<\/code><\/pre>\n<p>Could you help with this please?<\/p>\n","protected":false},"template":"","class_list":["post-12778958","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12778958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12778958\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12778958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}