Hi there,

I have been trying to modify a new import for my drupal 6 + ubercart. I have successfully added 1400 products, with catergories and manufacturers. Using the same file, I attempted to now add a product image per product.

I FTP'd the pics to both (sites/default/files/image, sites/default/files/images, and third try to sites/default/files)
each attempt I get the following:

Record 4:
Input error: RH INNR FENDER PARTIAL CHEVELLE-BEAUMONT-MALIBU-EL CAMINO-SPRINT 68-72.JPG is not allowed for image (not a file in sites/default/files).
values = Array
(
[created] =>
[node_import_build_mode] => 1
[title] => RH INNR FENDER PARTIAL
[type] => product
[cck:field_image:list] =>
[cck:field_image:data] =>
[cck:field_image:fid] =>
[format] => 2
[body] => RH INNR FENDER PARTIAL CHEVELLE-BEAUMONT-MALIBU-EL CAMINO-SPRINT 68-72
[model] => 4
[list_price] =>
[cost] =>
[sell_price] => 1.00
[shippable] => 1
[weight] =>
[weight_units] => lb
[length_units] => in
[length] =>
[width] =>
[height] =>
[pkg_qty] =>
[default_qty] => 1
[ordering] =>
[uid] => 1
[revision] =>
[log] => Imported with node_import.
[sticky] => 0
[promote] => 1
[status] => 1
[path] =>
[name] => jccustoms
[taxonomy] => Array
(
[1] => Array
(
[0] => 3
)

[5] =>
[3] => Array
(
[0] => 5
)

)

No other errors, just this on every product. I double-checked the file names for the jpgs, etc, they match exactly to the FTP files and the CSV column called "Image".

Here is an example of my CSV:

Name SKU Sell Price Shippable Default Cart Quantity Manufacturer Category Description Image
BATTERY TRAY 1 1.00 1 1 Chevrolet CHEVROLET BEAUMONT BATTERY TRAY CHEVELLE-BEAUMONT-MALIBU-EL CAMINO-SPRINT 68-72; CHEVROLET IMPALA 68; MONTE CARLO 70-72 BATTERY TRAY CHEVELLE-BEAUMONT-MALIBU-EL CAMINO-SPRINT 68-72; CHEVROLET IMPALA 68; MONTE CARLO 70-72.JPG
FT FLOOR BRACE FULL 2 1.00 1 1 Chevrolet CHEVROLET BEAUMONT FT FLOOR BRACE FULL CHEVELLE-BEAUMONT-MALIBU-EL CAMINO-GTO-LEMANS-TEMPEST 64-72; SKYLARK 67-72; MONTE CARLO 70-72; CUTLASS 66-72; SPRINT 68-72 FT FLOOR BRACE FULL CHEVELLE-BEAUMONT-MALIBU-EL CAMINO-GTO-LEMANS-TEMPEST 64-72; SKYLARK 67-72; MONTE CARLO 70-72; CUTLASS 66-72; SPRINT 68-72.JPG

Thank you for any fixes or guidance in advance!

L79

Comments

zeezhao’s picture

A few points:

- if the file is sites/default/files/SPRINT 68-72.JPG, then in your csv file it should be ;"SPRINT 68-72.JPG";

or if it is sites/default/files/images/SPRINT 68-72.JPG, then csv should contain ;"images/SPRINT 68-72.JPG"

- then ensure that double quote is chosen as the as "Text delimiter"

- since your fields have spaces, better to ensure that double quote is used for all fields anyway

If it still does not work, I cant recall if the update works for images in the version you are probably using. So its best you start with a fresh database when loading the images, rather than using the "update" mode.

swilks’s picture

I am also having the same problem (slight variation). The error is;

Input error: admin/patellacea_1989.jpg is not allowed for Photo (not a file in sites/default/files/[user]).
Photo field is required.

I have tried with the file in
- files
- files/admin (admin is the used)

I have also varied the name supplied to:
- patellacea_1989.jpg
- admin/patellacea_1989.jpg
- sites/default/files/admin/patellacea_1989.jpg

And tried formatting as tab and CSV but every time the error is the same.
I have also tried this with both the 6.x-1.0-rc4 and the current development snapshot.

I also wondered whether it could be a rights issue but even when I point it at a file that has been uploaded through Drupal I still got the same error.

Have you any ideas on other things that I could try? This has the potential to save me an enormous amount of time - I have a lot of images :)

Also I didnt quite understand what you meant by "So its best you start with a fresh database when loading the images, rather than using the update mode."

Many thanks in advance for any ideas you can offer.

Steve

swilks’s picture

Sorry - sorted it now (or at least understand it). It is documented here: http://drupal.org/node/374352 but I just didnt understand it when I read it.
For others, the node_import does not include support for tokens yet. So, if like me you are using one of these to determine where the files are uploaded to (I was using [user] to ensure each user had their files put in a separate directory) the node import will not work. The work around is to (temporarily in my case) is to alter the content type definition so that it does not use a token and just has a fixed path. So I should be able to upload all my files into the directory "Steve Wilkinson", alter the field definition in the relevant content type to load all images into this directory and then run the node import to actually haul the images in.
Hope this makes sense
Steve

Alun’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.