**Bug** Import tool in v11 does not insert file links for pictures in "Item" doc type

Ok, So I am trying to get more complete uploads when I use the import tool to push my new Items into the database.

When it comes to “Items” one of the most important fields is the location of the picture files.
See screenshot:

image

.
.
In the above screenshot you can see that I filled in the file location and filename for each of the item pictures and the reduced sized thumbnails.

Prior to importing this Items template, I had already doe the following:

  • created default warehouse
  • created product groups
  • created valid suppliers
  • Used Filezilla to push all picture files to ~/frappe-bench/sites/site1.local/public/files/

Everything imported correctly and all data shows up, but the pictures do not show up when you go to Items and call them up one at a time. They are all with no pictures EXCEPT for the one item I created by hand in the user interface and uploaded the picture in the user interface.

So I have all my Items imported with success but no pictures showing for the imported ones.

Only the ones that I use the user interface to upload individually show up properly.

Please advise.

BKM

Further evidence of a BUG

After I had a successful import and could not find any of the pictures associated with the Items, I decided to download another Import template with data to see what the system thought was in the database.

Here is a screenshot of the same part of the file that you can see I uploaded in the post above:

image

.
.
You will notice that the “Image” column has no data in it. It was never applied to the database and the data that was in the column in the uploaded file was simply thrown away.

The funny thing is that it accepted the file locations for the Thumbnails.

It really doesn’t make much sense.

Interestingly enough… the thumbnail pics do not show up either when you go to the POS screen where you expect to see the thumbnail pics in the Item grid.

.
.
So, at this point I cannot find any way to get this to work except to upload pictures one at a time through the user interface. That is a tedious process for thousands of Items. This should work properly with the import.

One last thing…

Since I noticed the import process threw away the the picture file links and kept the thumbnail links, I thought I would try importing the same file with only the main picture file links and leave thumbnail column empty. The thought process was that the user interface only gets the main file anyway and it automatically creates the thumbnail file. So, I thought maybe if I send it only the main picture file links, it would create the thumbnails.

Wrong!! It just threw away the file links again and there were no file links at all when checked afterward.

I made a backup before doing any of this so I could retry several combinations in case something went wrong. None of the combinations I tried worked. They all trhew out the file link data.

This definitely looks like an import bug.

Please advise.

BKM

Has anyone successfully imported the picture (images) links while importing “Items” data?

Am I maybe doing it incorrectly?

Everything else in the CSV file imports like you would expect, but the image links get thrown away. I just want to make sure it is not something I might be doing wrong at this point.

I really do not look forward to having to upload about 1,000 pictures one at a time!!

Any help would be greatly appreciated.

BKM

Hi @bkm

This is only a guess but perhaps a workaround would be to mass upload all the images to the files/attachments then work out what the correct link is to the images that you just imported.

Also files and images can be saved as Private or Public. The path changes depending on what it is.

Worth a try anyway …

Yeah, I tried that.

First I created a single Item entry by hand through the user interface complete wiht an image file. Then I downloaded the import template with data for the Items doc type.

When I found how the import template listed the image file links, I duplicated that format of the data I filled into the template for the importation of the rest of the Items.

The system had put the image files in the ~/frappe-bench/sites/site1.local/public/files/ directory so that is where I pre-loaded all of the image (jpg) files before the import was executed.

No matter how I do it, the Image links get thrown away, but only for the primary image files. The thumbnail file links are accepted but they do not actually work anywhere in the system.

At this point I have restored the database back to before the import, and deleted all the image files from the public files directory. I imported the data again without any of the file links.

Now I am calling up the items one at a time and drag-n-dropping the image files into each one by hand through the user interface. I have about 975 files to go, so this should take me about 2 or 3 days.

This has to be a bug. I have tried every combination of importing I could think of except doing it by command line.

If I knew how to do it by command line, I would even try that as well, but I have never heard of a command line syntax to do that function.

This is really a deal breaker. I cannot afford the time to do this for all my new clients. some of them have over 15k sku numbers. It would take far too long to get all the files loaded this way.

Thanks for the suggestion, but I have already been down that road and several detours as well.

BKM

1 Like