Closed (works as designed)
Project:
Node import
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2009 at 13:20 UTC
Updated:
20 May 2011 at 18:35 UTC
I've tried importing products into ubercart and at one point the image import worked, but now I get an error:
Input error: Plex-PK56.JPG is not allowed for Image (not a file in sites/default/files).
I've tried all sorts of putting in paths (/Plex-PK56.JPG), moving the images directly to sites/default/files, but nothing seems to work. Weird as at first it seemed to work ok.
Any suggestions?
Thanks
Comments
Comment #1
bloke_zero commentedSorry - I'm being less intelligent than the module, which is importing the images and puts them in a new location, which if you make a mistake and try and re-import the CSV file means that the image is no longer in that folder. Well, duh!
Comment #2
mgladding commentedNode Import was working perfectly for me and I was able to import images, but now I am also getting the referenced error. I don't quite understand what you mean by "the image is no longer in that folder." I've checked my folders and the images are there. I've been using the same images over and over and I haven't run into this problem before.
Comment #3
mgladding commentedComment #4
slimabraham commentedI am encountering the same issue you mentioned here. Node import was working, but after a successful import run, I fixed the remaining rows with errors in the csv and tried re-importing these. All rows fail with the above error. The folder and images are all still there. Did you manage to resolve this in the end?
Comment #5
j0rd commentedI am experiencing this problem as well. I know why it's happening though and I would suggest a change in the way that node_import works to resolve everyones problems here.
Pre-Text for the issue
Have two rows in your CSV which point to the same image file. Put a directory to move the image to setup in that imagefield.
What's currently happening:
Node import goes through your import one line at a time. When it hits the first instance of this image, it moved it to it's proper folder. When the second import line comes around, the image is no longer there.
What should be fixed to resolve this issue:
Node import should copy the image, instead of moving it. This way the image will be available for future imports and multiple nodes.
If you put your images back and re-import the bad rows, it should resolve your problem. Although imho, this is not an idea solution and I think the logic should be changed.
--
Ubercart Theme Development
Comment #6
dcomfort commentedIt appears that node import looks for the referenced images in the import directory, i.e., the same directory as the imported file, rather than sites/default/files
You can set the import directory for the files at
admin/content/node_import/settings
This appears to be an error in the logic, but putting the images in the import directory appears to work
Comment #7
wunderbard commentedFor "Image" the CSV file contains: "sites/default/files/testimage.png"
From node-import I got this message in Step 7:
Input error: sites/default/files/testimage.png is not allowed for Image (not a file in sites/default/files).
After numerous error messages I eventually put testimage.png inside both sites/default/files and sites/default/files/imports so node-import had 2 options to choose from. No luck.
I even copied the image path by uploading testimage.png creating a new product in Ubercart. Creating the product with the image proved utterly successful. The path I got from the system I then pasted into the CSV file: /Volumes/HD/htdocs/drupal/sites/default/files/testimage.png. What do you think node-import had to say about that? Well, here it is:
Input error: /Volumes/HD/htdocs/drupal/sites/default/files/testimage.png is not allowed for Image (not a file in sites/default/files).
How to solve this problem? Thanx in advance.
Comment #8
wunderbard commentedI have found the solution here: https://drupal.org/node/651890
The answer is that, if your image is located in sites/default/files the CSV file should read:
NOT: "sites/default/files/testimage.png"
BUT ONLY: "testimage.png"
If the image is located somewhere else, you should make the path relative to sites/default/files.
Comment #9
mibfire commentedAnd there is no solution if the image would be ranamed(in cck filaname setting) cos the location could be same but after first import, image will be renamed so therefore next line of import wont find the image.
Comment #10
mibfire commentednot solved
Comment #11
szantog commentedThis isn't in connection with node import module.
You use filefield_path - it works: move, rename and delete the file.
At the and: This is different case, than the original issue, which is solved, as I see.