Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I'm trying to import node who contains files. I have set node mapping of the field file and field image. It's working with image but no with file. I obtain a error message after the importation : SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'fid' cannot be null.
Anyone have a idea for this error ?
Thanks
Comment | File | Size | Author |
---|---|---|---|
#9 | feeds-file-download-sql-error-2077343-9.patch | 1015 bytes | wroxbox |
#1 | feeds-file_save_fid_null-2077343-1.patch | 568 bytes | Leksat |
#9 | feeds-file_save_fid_null-2077343-2.patch | 543 bytes | wroxbox |
Comments
Comment #1
Leksat CreditAttribution: Leksat commentedI also have this error using the latest dev version. I suppose it's related to #1080386: Add mapping for title and alt fields on images..
In my case the error appears when I import image file and it's alt text, and when file can't be downloaded. So the file field added to an entity in file_feeds_set_target() looks like this:
Attached patch that fixes issue for me.
Comment #2
vitchy CreditAttribution: vitchy commentedI tried your patch and i haven't any message now but no file was uploaded in drupal file system and database for field file.
It's working for you (not for image field but for a custom file field in node content type) ?
Comment #3
twistor CreditAttribution: twistor commentedWhat do the values look like that you are mapping to the uri field?
Comment #4
vitchy CreditAttribution: vitchy commentedI created a field type "file" with cck in node content type and i mapped the "File: URI" target with feed node processor.
In my CSV file, for my "file" field mapping, i set a url value for the URI. And nothing is uploaded in system file and no value set in database.
But it's working well with image field.
Comment #5
msamavi CreditAttribution: msamavi commentedThe same problem here!
Comment #6
jackhutton CreditAttribution: jackhutton commentedGetting this error as well: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'fid' cannot be null
log message:
tried a few different approaches but no success.. does the above patch apply to the october 1st 7.x-2.x-dev version? Didn't apply for me..but, that could be me..
be great to attach images to nodes again.
thanks
Comment #7
mjcarter CreditAttribution: mjcarter commentedEdit - The issue I was getting originally appears to be related to the media_feeds module. Just upgraded to the dev version of feeds, now I get the same error as everyone else. Applied patch by Leksat - errors disappear and import works, but file fields are empty in the imported users.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedMy problem stemmed from having certain characters in the file names, e.g. dash
Comment #9
wroxbox CreditAttribution: wroxbox commentedfeeds-file_save_fid_null-2077343-2.patch is for alpha7
feeds-file-download-sql-error-2077343-9.patch is for 2.x-dev
Comment #10
uladzimir.karol CreditAttribution: uladzimir.karol commented>>>feeds-file-download-sql-error-2077343-9.patch is for 2.x-dev
Your patch resolved the issue. Thank you.
Comment #11
web226 CreditAttribution: web226 commentedfeeds-file-download-sql-error-2077343-9.patch also worked for me with 2.x-dev. Thank you very much.
Comment #12
twistor CreditAttribution: twistor as a volunteer commentedThis was fixed a long time ago.