Title: Database error Unknown column
Last modified: January 27, 2023

---

# Database error Unknown column

 *  Resolved [canis54](https://wordpress.org/support/users/canis54/)
 * (@canis54)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/database-error-unknown-column-3/)
 * 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:
 *     ```wp-block-code
       [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_posts
       ```
   
 * Unfortunately, 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.33cURL: 7.74.0MariaDB: 10.10.2Webserver: nginx 1.22.1
 * Do you have a hint for our troubleshooting? Many thanks and greetings! Canis
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-error-unknown-column-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [stephanieliy](https://wordpress.org/support/users/stephanieliy/)
 * (@stephanieliy)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/database-error-unknown-column-3/#post-16434229)
 * Hi [@canis54](https://wordpress.org/support/users/canis54/),
   Glad you reached
   out. I’ve been running some tests to see if I can replicate the errors you are
   seeing, but I haven’t been successful.I’d like to gather a bit more information.
   First, send along your full system information. You can do this by navigating
   to Donations > Tools > System Info (tab) and click the button to “Get System 
   Report” and copy/paste that in your reply here. In the meantime, double check
   to make sure you have a Donation Confirmation page set up in Donations > Settings
   > General > Success Page. Once I have a bit more context, I should be able to
   hop on in. Let me know if you have questions in the meantime, I’m happy to help.
 *  [stephanieliy](https://wordpress.org/support/users/stephanieliy/)
 * (@stephanieliy)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/database-error-unknown-column-3/#post-16445083)
 * Hi [@canis54](https://wordpress.org/support/users/canis54/),
   It’s been a bit 
   since we’ve heard back, and I know troubleshooting can need a little extra time.
   If you still have questions you can create a new ticket right here and we’ll 
   be happy to give things a look. Have a great day!
 *  Thread Starter [canis54](https://wordpress.org/support/users/canis54/)
 * (@canis54)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/database-error-unknown-column-3/#post-16445114)
 *     ```wp-block-code
       Dear Stephanie,many thanks for the support. Yes, we have a success page:
   
       https://kirchenbau.org/spenden-bestaetigung/
   
       The system report follows.
   
       Best regards!Canis
   
       WordPress-UmgebungHome URL: https://kirchenbau.orgSite URL: https://kirchenbau.orgWP-Version: 6.1.1WP-Netzwerk: –WP Memory Limit: 512 MBWP-Debug-Modus:WP-Cron: –Sprache: de_DEPermalinkstruktur: /%year%/%monthnum%/%day%/%postname%/Auf Startseite anzeigen: pageStartseite: Startseite (#849)Seite für Beiträge: Nicht festgelegtTabellen-Prefix: wp_Tabellen-Präfix Länge: 3Tabellen-Präfix Status: AcceptableAdmin AJAX: VerfügbarRegistrierte Beitrags-Status: publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, refunded, failed, revoked, cancelled, abandoned, processing, preapprovalServer-UmgebungHosting-Anbieter: DBH: localhost:/var/run/mysqld/mysqld.sock, SRV: kirchenbau.orgTLS Anschluss: Verbindung verwendetTLS Bewertung:Server-Information: nginx/1.22.1PHP-Version: 7.4.33PHP Post Max Size: 8 MBPHP Time Limit: 30PHP Max Input Vars: 1000PHP Max Upload Size: 6 MBcURL-Version: 7.74.0, OpenSSL/1.1.1nSUHOSIN installiert: –Standardzeitzone ist UTC:fsockopen/cURL:SoapClient:DOMDocument:gzip:GD Graphics Library:Multibyte String:Remote Post:Remote Get:GiveWP ConfigurationGiveWP Version: 2.24.1GiveWP Cache: AktiviertDatenbank Updates: Alle Datenbank-Updates erfolgreich abgeschlossen.Database Migrations: All Database Migrations Completed.Datenbanktabellen:wp_give_donorswp_give_donormetawp_give_commentswp_give_commentmetawp_give_sessionswp_give_formmetawp_give_sequential_orderingwp_give_donationmetawp_give_revenuewp_give_migrationswp_give_logGiveWP Cache: AktiviertGiveWP Emails:Neue SpendeSpendenquittungDonation Processing ReceiptNeue Offline-SpendeAnweisung für ÜberweisungenNeue BenutzerregistrierungInformationen zur BenutzerregistrierungDonation NoteE-Mail-ZugangAktualisiert von: 2.23.2Testmodus: DeaktiviertWährungscode: EURPosition Währungssymbol: NachherDezimaltrennzeichen: ,Tausender Trennzeichen: .Erfolgsseite: https://kirchenbau.org/spenden-bestaetigung/Fehlerseite: https://kirchenbau.org/spende-gescheitert/Spendenverlaufsseite: https://kirchenbau.org/donor-dashboard/GiveWP Forms Slug: /donations/Aktivierte Zahlungs-Gateways: Stripe - Credit Card, Stripe - SEPA Direct Debit, Überweisung, PayPal-SpendenStandard-Zahlungs-Gateway: Stripe - Credit CardPayPal IPN Mitteilungen: N/ASpender-E-Mail-Zugriff: DeaktiviertStripe Webhook Notifications: 27. Januar 2023 17:15Active GiveWP Add-onsAndere aktive PluginsAdvanced Cron Manager von BracketSpace – 2.5.0Cloudflare von Cloudflare, Inc. – 4.11.0Cookie Notice & Compliance for GDPR / CCPA von Hu-manity.co – 2.4.6hCaptcha for WordPress von hCaptcha – 2.4.0Health Check & Troubleshooting von The WordPress.org community – 1.5.1Limit Login Attempts Reloaded von Limit Login Attempts Reloaded – 2.25.11Simple History von Pär Thernström – 3.3.1Slider Revolution von ThemePunch – 6.6.7TheGem Blocks von Codex Themes – 1.1.5TheGem Theme Elements (for WPBakery) von Codex Themes – 5.7.1User Login History von Er Faiyaz Alam – 2.1.0User Role Editor von Vladimir Garagulya – 4.63.2WordPress Page Widgets von CodeAndMore – 3.9WP-Matomo Integration von André Bräkling – 1.0.27wp-Typography von Peter Putzer – 5.9.1WPBakery Page Builder von Michael M - WPBakery.com – 6.10.0WP Mail SMTP von WPForms – 3.7.0Inaktive PluginsThemeName: Kirchenbau HellVersion: 1.0Autor-URL: http://kirchenbau.orgChild-Theme: JaEltern-Theme-Name: TheGemEltern-Theme-Version: 5.7.1Eltern-Theme-Autor-URL:
       ```
   

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

The topic ‘Database error Unknown column’ is closed to new replies.

 * ![](https://ps.w.org/give/assets/icon-256x256.jpg?rev=2873287)
 * [GiveWP - Donation Plugin and Fundraising Platform](https://wordpress.org/plugins/give/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/give/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/give/)
 * [Active Topics](https://wordpress.org/support/plugin/give/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/give/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/give/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [canis54](https://wordpress.org/support/users/canis54/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/database-error-unknown-column-3/#post-16445114)
 * Status: resolved