• Hi,

    I have downloaded the latest version of the plugin and was testing. This plugin has a ton of great features, but my main use-case, importing data via CSV, does not function.

    When I import a CSV into a table I created through the plugin, the webpage reloads. After I check the database, and no records have been inserted into the database. Also, the steps in the import process do not function.

    How can I get the import feature to work?

    Thanks for all your help in advance!

    https://wordpress.org/plugins/custom-database-tables/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jlemieuxsignal

    (@jlemieuxsignal)

    Version number is 2.1.32 on wordpress 4.5.3.

    Plugin Author ka2

    (@ka2)

    Thank you for your inquiry.

    Could you go to step 3 on import wizard when you import csv?
    So I will introduce an actual example of import procedures by the CSV in the following, please try to reference.

    The structure of the import table:

    CREATE TABLE wp_test (
      ID bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
      name varchar(100) NOT NULL COMMENT 'Name',
      gender enum('male','female') NOT NULL COMMENT 'Gender',
      age tinyint(4) unsigned NOT NULL COMMENT 'Age',
      user_id bigint(20) unsigned DEFAULT NULL COMMENT 'User ID',
      profile text COMMENT 'Profile',
      created datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created Datetime',
      updated timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated Datetime',
      PRIMARY KEY (ID),
      KEY user_id (user_id)
    ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='For TEST';

    The contents of the CSV file:

    Firstname Lastname,male,20,1,"This ""text"" must be escaped.",2016/6/25 0:00

    Firstly in the step 1 on the section of import data, we remove columns of the “ID (as auto increment column)” and the “updated (as auto insertion timestamp column)” from the “Prepend Indices Line”. Then, we specify the CSV to import, and click the button of “Upload”.

    If we can upload the importable CSV, we can proceed to step 2. In the step 2, we can confirm SQL for importing. Let’s press the “Import” button.

    The import process completed correctly, if it is displayed of “data is imported successfully” at the step 3. If an error occurs here, it is likely that there is a deficiency in character escape of data in the CSV file.

    Thank you,

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

The topic ‘Import data feature bugged’ is closed to new replies.