Database error Unknown column
-
Dear Sir or Madam,
we have now noticed that the donor confirmation page no longer works after a donation. The donation itself works. After activated debugging, the following DB errors appear in the debug.log:[27-Jan-2023 15:18:25 UTC] WordPress database error Unknown column 'gm.post_id' in 'on clause' for query SELECT wp_posts.ID FROM wp_posts INNER JOIN wp_give_formmeta ON ( wp_posts.ID = wp_give_formmeta.form_id ) LEFT JOIN wp_give_formmeta gm ON (wp_posts.ID = gm.post_id AND gm.meta_key='_sku')WHERE 1=1 AND (( wp_give_formmeta.meta_key = '_give_goal_option' AND wp_give_formmeta.meta_value = 'enabled' )) AND wp_posts.post_type = 'give_forms' AND ((wp_posts.post_status = 'publish')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_title ASC LIMIT 0, 30 made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Give_Shortcode_Generator->init, Give_Shortcode_Generator->get_fields, Give_Shortcode_Generator->generate_fields, Give_Shortcode_Generator->generate_post, get_posts, WP_Query->query, WP_Query->get_posts [27-Jan-2023 15:18:26 UTC] WordPress database error Unknown column 'mt2.post_id' in 'on clause' for query SELECT wp_posts.* FROM wp_posts INNER JOIN wp_give_donationmeta ON ( wp_posts.ID = wp_give_donationmeta.donation_id ) INNER JOIN wp_give_donationmeta AS mt1 ON ( wp_posts.ID = mt1.donation_id ) INNER JOIN wp_give_donationmeta AS mt2 ON ( wp_posts.ID = mt2.post_id ) LEFT JOIN wp_give_donationmeta gm ON (wp_posts.ID = gm.post_id AND gm.meta_key='_sku')WHERE 1=1 AND (( wp_posts.post_date >= '2023-01-19 00:00:00' AND wp_posts.post_date <= '2023-01-20 00:00:00' )) AND wp_posts.post_parent = 0 AND (( wp_give_donationmeta.meta_key = '_give_payment_currency' AND wp_give_donationmeta.meta_value = 'EUR' ) AND ( mt1.meta_key = '_give_payment_mode' AND mt1.meta_value = 'live' )AND ( mt2.meta_key = '_give_payment_gateway' AND mt2.meta_value IN 'offline','stripe','stripe_checkout','stripe_sepa','stripe_becs','paypal','paypal-commerce'))) AND wp_posts.post_type = 'give_payment' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'refunded' OR wp_posts.post_status = 'failed' OR wp_posts.post_status = 'revoked' OR wp_posts.post_status = 'cancelled' OR wp_posts.post_status = 'abandoned' OR wp_posts.post_status = 'processing' OR wp_posts.post_status = 'preapproval'))GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Give\API\Endpoints\Reports\Endpoint->handleRequest, Give\API\Endpoints\Reports\TotalIncome->getReport, Give\API\Endpoints\Reports\TotalIncome->get_data, Give\API\Endpoints\Reports\TotalIncome->get_income, Give\API\Endpoints\Reports\Endpoint->getPayments, Give_Payments_Query->get_payments, WP_Query->__construct, WP_Query->query, WP_Query->get_postsUnfortunately, we cannot say exactly when the error first appeared, so it may be related to an update of WordPress itself or the plugin. We know for sure that it was still working in August 22. The following setup is running on the server:
WordPress: 6.1.1
PHP: 7.4.33
cURL: 7.74.0
MariaDB: 10.10.2
Webserver: nginx 1.22.1Do you have a hint for our troubleshooting? Many thanks and greetings! Canis
The page I need help with: [log in to see the link]
The topic ‘Database error Unknown column’ is closed to new replies.