How to Fix the “Something Went Wrong on Insert Into: jet_fb_payments” Error in JetFormBuilder

How to Fix the Something Went Wrong on Insert Into jet_fb_payments Error in JetFormBuilder

Encountering the “Something went wrong on insert into: jet_fb_payments” error in JetFormBuilder Stripe gateway add-on can be frustrating, but resolving it is easier than you think. This comprehensive guide will walk you through troubleshooting and fixing the problem, step by step.


Table of Contents

  1. Introduction to the Error
  2. Steps to Fix the Error
  3. Conclusion

Introduction to the Error

The error “Something went wrong on insert into: jet_fb_payments” typically occurs when the jet_fb_payments database table, used by the JetFormBuilder plugin to store payment information, is either missing, corrupted, or incorrectly structured. Without this table, the plugin cannot process payment data, leading to the error.

This guide will show you how to resolve the issue efficiently.

#step-1-backup-your-website-and-forms

Steps to Fix the Error

Step 1: Backup Your Website and Forms

Before making any changes, it’s crucial to back up your website and forms.

  1. Export Existing Forms:
    • Navigate to JetFormBuilder > Forms in your WordPress dashboard.Export all existing forms as a backup by clicking the Export button.Save the exported file securely.
    export-form
  2. Take a Full Website Backup:
    • Use a plugin like UpdraftPlus or All-in-One WP Migration to back up your website.Ensure both your database and files are included in the backup.

Step 2: Verify the jet_fb_payments Table

  1. Install WP Data Access:
    • Go to Plugins > Add New in your WordPress dashboard.
    • Search for WP Data Access and install it.
    • Activate the plugin.
  2. Open Data Explorer:
    • Navigate to WP Data Access > Data Explorer.
    • Check if the jet_fb_payments table exists.

What Is jet_fb_payments?

The jet_fb_payments table stores critical information related to form payments, including:

  • id: A unique identifier for each payment (Primary Key).
  • form_id: The ID of the form linked to the payment.
  • payment_status: The status of the payment (e.g., completed, pending).
  • amount: The amount paid.
  • created_at: A timestamp for when the payment was logged.

If the table is missing or has incorrect rows, move to Step 3.


Step 3: Recreate or Alter the Database Table

Option A: Recreate the Table

If the table is missing, recreate it using an SQL query:

  1. Open SQL Query Builder:
    • In WP Data Access, go to SQL Query Builder.
  2. Run the Following Query:
CREATE TABLE IF NOT EXISTS `jet_fb_payments` (
 `id` INT(11) NOT NULL AUTO_INCREMENT,
 `form_id` INT(11) NOT NULL,
 `payment_status` VARCHAR(255) NOT NULL,
 `amount` DECIMAL(10, 2) NOT NULL,
 `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 

      Option B: Alter the Existing Table

      If the table exists but has missing or incorrect rows, run the following query to update its structure:

      ALTER TABLE `jet_fb_payments`
      MODIFY `id` INT(11) NOT NULL AUTO_INCREMENT,
      ADD COLUMN `form_id` INT(11) NOT NULL AFTER `id`,
      ADD COLUMN `payment_status` VARCHAR(255) NOT NULL AFTER `form_id`,
      ADD COLUMN `amount` DECIMAL(10, 2) NOT NULL AFTER `payment_status`,
      ADD COLUMN `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP AFTER `amount`;
      
      

      Step 4: Test the Plugin

      1. Submit a Test Form:
        • Create and submit a test form that includes payment processing.
        • Check if the error has been resolved.
      2. Verify Payments Logging:
        • Open the jet_fb_payments table in WP Data Access and confirm that new entries are being recorded.
      Verify Payments Logging

      Conclusion

      Fixing the “Something went wrong on insert into: jet_fb_payments” error involves a mix of careful backups, database verification, and restructuring the table if necessary. By following this guide, you can ensure your JetFormBuilder plugin functions seamlessly.

      For further assistance with WordPress or database-related issues, visit Revisions, where we help developers tackle technical challenges. Have you faced similar database issues? Let us know how you resolved them in the comments!

      Was this article helpful?
      YesNo
      Abdullah Khalid web developer profile pic

      Need help in fixing your website?

      Hi! I'm Abdullah & I specialize in Custom theme, Elementor, and Crocoblocks. Let’s work together to bring your ideas to life.

      Have any Questions?

      More Articles