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.
I've reduced my csv down to just 3 fields: guid, body and published. I've tried every separator, text qualifier and all i get is errors. I would appreciate any help I can get getting this content into drupal. Here's the latest error (one line for each record attempted), but they vary depending on what I try:
SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'last_comment_uid' at row 1
Please, if you could look at the attached file, it owuld be greatly appreciated and any advice you could offer. The body seems to be the problem. it's encoded utf-8.
Thanks again,
Doug
Comment | File | Size | Author |
---|---|---|---|
#20 | 1156982-FeedErrorNodeCommentInsertWithoutUID-20.patch | 851 bytes | dooug |
#13 | FeedsErrorNodeCommentInsertWithoutUID-1156982-12.patch | 510 bytes | dooug |
#11 | FeedsErrorNodeCommentInsertWithoutUID-1156982-11.patch | 467 bytes | dooug |
dbo_news.txt | 2.33 MB | dotman |
Comments
Comment #1
hellomobe CreditAttribution: hellomobe commentedI'm getting a similar error. Looks like it's caused by a custom element. Any fix/config for feeds to ignore custom fields?
Edit: using dev version of feeds, generic import form, HTTP Fetcher, Simple Synd. Parser, Node Processor
Comment #2
dotman CreditAttribution: dotman commentedi've got my imports working now. Image is being fetched from remote site (so image field is populated), and my tags are being imported as individual terms into my vocabularies. so awesome. patch for terms here i think it was:
http://drupal.org/node/959984
and image field here:
http://drupal.org/node/1190868
Regarding just getting the basic text fields working, i exported my csv from MySql without a text qualifier, and made sure it was set to utf8 and unix LF. Then the basic imports started working.
Now i have to see if the user reference field works.
Comment #3
ShaneOnABike CreditAttribution: ShaneOnABike commentedI was also receiving these errors but - I figured it out!
The reason this was happening is because the original importer that I cloned had a uid element left in it. So when it's attempting to import content with a column that is missing for UID it basically fails. Ooops.
Comment #4
giorgio79 CreditAttribution: giorgio79 commentedI am getting this error message as well, and Feeds report 0 imports, yet the content is imported!
I have just a single column text file with titles. The content type has some fields (none required), and the import fails on those.
Any tips?
Comment #5
er_gaurav_sharma CreditAttribution: er_gaurav_sharma commentedVery simple dear your CSV file is not utf 8 encoded that is required when inserting a database record of a node
Comment #6
giorgio79 CreditAttribution: giorgio79 commentedThanks I tried the following in Notepad++
-convert to uft8 the encoding
-convert line endings to Unix
The error still exists unfortunately.
Comment #7
johnbarclay CreditAttribution: johnbarclay commentedThis is an encoding problem with the text. Not a bug.
You might try html entity decode in feeds_tamper.
Even in utf8 encoded data, I always have problems with entities being in text they don't belong in. Below is a sample set from a recent project. The text going into drupal should not have the entities such as & in most fields (title, body, etc.).
Comment #8
giorgio79 CreditAttribution: giorgio79 commentedHello,
Wanted to share my solution:
I did not have default values set for required fields. After setting those my problem went away. For me encoding was not the issue.
Comment #9
Andy1966uk CreditAttribution: Andy1966uk commentedCan you please explain what fields and where i.e. which module etc. I have the same error and can find out what causes it..
Comment #10
derekw CreditAttribution: derekw commentedFor this particular error referencing last_comment_uid, I turned off the core Comment module during my feeds import and the error disappeared.
Comment #11
dooug CreditAttribution: dooug commentedI am also experiencing this error when using a 7.x-2.x-dev Feed importer with FeedsNodeProcessor.
I can confirm that disabling the comment module allows me to import. Although that is not an acceptable solution.
I looked into the database to found this error is happening on this table:
node_comment_statistics
I discovered in my case that the error is being caused when a new nodes is being created and the function
comment_node_insert()
is passed a$node
parameter that does not have the$node->uid
set. That function is called fromentity_save()
inFeedsNodeProcessor.inc
.So, I proposed a patch that is a quick fix solution (at least in my case). I am not sure if this problem needs to be fixed elsewhere in the code, but my patch will ensure
$entity->uid
is set.Comment #12
dooug CreditAttribution: dooug commentedComment #13
dooug CreditAttribution: dooug commentedupdated patch to utilize entityValidate function.
Comment #14
emackn CreditAttribution: emackn commentedcan you provide an import file to test this fix with. I like the change, but don't have any way to verify the change actually works before I commit this patch.
Thanks.
Comment #15
vogelsang CreditAttribution: vogelsang commentedI got the problem with multiple imports as well when using the FeedsHTTPFetcher. I tried to apply the path from #11 and #13 to the FeedsHTTPFetcher, but it doesn't work for me.
I like to help out with this, but I am still quite new to Drupal coding, so I am not sure where to start (with debugging or whatever).
Comment #16
dooug CreditAttribution: dooug commented@vogelsang, when you say "it doesn't work for me" did you mean the patch didn't apply or the patch did apply but you still experienced errors? Are you using the latest 7.x-2.x-dev? Can you provide any example of what you are try to do?
Comment #17
franzComment #18
giorgio79 CreditAttribution: giorgio79 commentedEven better title. I am still getting this. Is it just us that face this issue?
Comment #19
giorgio79 CreditAttribution: giorgio79 commentedThanks, #13 patch still applies clean and works :)
Comment #20
dooug CreditAttribution: dooug commentedI re-rolled the patch, should apply to latest 7.x-2.x-dev.
Comment #21
twistor CreditAttribution: twistor commentedhttp://drupalcode.org/project/feeds.git/commit/3b51292