Author Topic: Need help with Import problem  (Read 3238 times)

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Need help with Import problem
« on: August 02, 2017, 12:37:16 AM »
Yesterday, I exported my Resource Library as CSV so that I could more efficiently edit image alt attributes in Excel. 

When I finished editing, I saved the csv and imported it. 

On the AbanteCart import screen, there is an option to "Run in a test mode, to see if any issues are present".

Since this was my first csv import, Test mode seemed like a good idea, so I checked that box, and then I clicked Import. 

I got no errors.   

I then assumed that since the "test" worked, I should Import the csv file "for real", without the Test box checked. 

So I unchecked the Test box and clicked Import again. 

I got 500 errors. 

I guess I didn't (and still don't) understand the actual purpose of Test mode.  I used test mode, received no errors, so common sense suggests that I should import in "Real" mode, right?
It seems like my 1st "Test" import actually loaded the import file, and my 2nd "non-Test" import loaded it again, causing duplicate errors.  I guess. 

These errors are all the same type of error:
"
insert data error in resource_map. SQL Error: Duplicate entry '100019-products-2' for key 'PRIMARY'
Error No: 1062
SQL: INSERT INTO `bebo_resource_map` SET `resource_id` = '100019', `object_name` = 'products', `object_id` = '2', `default` = '0', `sort_order` = '2', `date_added` = '2017-06-10 12:46:34', `date_modified` = '2017-06-10 12:46:34' 
"

My site still works.  All of my alt tag edits were properly loaded. So the import process worked.  But I still have the issue of 500 errors.   

Today, I used Export/Import again to edit Category meta, because the process is fast and efficient.  Today, when I imported the edited-&-saved csv file back into AbanteCart, I did not use "Test" mode.  Everything was perfect.  I got no errors. 

So I tried to fix my resource-library error problem by doing a phpmyadmin Check Table command on the resource library table.  No problems reported. 

So I did a Check Table on the entire database.  Only one problem was reported: a zero value in the auto-increment column of the stores table, which contains only one store, my store.  Not really a problem. 

So I used AbanteCart Admin panel to export my live resource-library and then I immediately re-imported it with no changes made. 

I got the 500 errors. 

My site works fine, but this error flag problem with that file cannot be a good thing.  I need to address it.

I need somebody who understands the Import Test function to tell me what happened during the "resource-library" "Test Import" sequence of events described above, and more importantly, how do I fix it?

Thanks.   

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: Need help with Import problem
« Reply #1 on: August 02, 2017, 12:45:36 AM »
This may help; this is the 1st line of the after-Import report:
"
Total loaded: 702. Updated: 197. Created: 0. Errors: 505
"

Obviously, 702-197=505. 

Something happened when I did back-to-back AbanteCart Imports of the same csv file, once in test mode and then immediately thereafter in "Not Test" mode, which caused this error problem. 

Tell me how to fix it.

Also, you might consider changing the language of the help bubble attached to Test mode to make it more clear what the Test Mode is, what it does, and how to use it, so that this Error generation problem is not created when a typical user follows an intuitive process such as:

Hey, Test-import succeeded, that's great, let's do a real import and then go get beer!

Thx.

nport

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Need help with Import problem
« Reply #2 on: August 02, 2017, 02:47:15 PM »
Thank you for your feedback.

Test mode was intended to perform import data structure test before import.  There is no check for each individual data point against existing data in your database.
I agree it is confusing and we have consideration to remove test mode as it will never be ideal test.

FYI. We are working on Import Wizard for v 1.2.11. Import Wizard will simplify basic import process.
Stay tuned.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: Need help with Import problem
« Reply #3 on: August 04, 2017, 03:49:40 AM »
Thank you!

Can you recommend a solution to my Multiple Error problem? 

I have started using csv export/edit/save/import process quite often to edit meta data. 

It is very efficient. 

I have no errors on my products file, despite several iterations of work cycle. 

But I still have the same multiple errors caused by the 1st iteration of the resource library work cycle, as described above. 

A solution to this problem requires knowledge of the Test function and how it could cause the problem via the sequence of events described above. 
I don't have that knowledge, but you do. 

My site is working, but the Multiple Error issue is frightening and worrisome and intractable and it is stressing out my cat.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Need help with Import problem
« Reply #4 on: August 06, 2017, 09:32:11 PM »
These errors in resource library are caused by some duplication. We need to understand what is causing duplicate inserts.

Possibly you are performing creation of new inserts with use of existing IDs that are locked by the database.

You might need to add 'update' in action column.

Can you include a sample CSV with just a record that cause the issue.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod