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.
Hi,
I am receiving following error every time when i do operation like 'edit','delete feed items' for particular 'feed' node.
Plz look into screenshot.
I am using
D-6.16
PHP 5.3.0
CCK 6.x-2.6
Filefield 6.x-3.2
Imagefield 6.x-3.2
Feeds 6.x-1.0-alpha12
Feeds Image Grabber 6.x-1.0-beta1
I am trying to fetch feed from http://feeds.feedburner.com/people/stylewatch/offtherack
and generating feed item with cck images.
Thanks in Advance
Comment | File | Size | Author |
---|---|---|---|
#22 | feeds-759302-query-range-2.patch | 3.29 KB | smartinm |
#21 | feeds-759302-query-range.patch | 3.29 KB | smartinm |
#11 | feeds_db_affected_rows_patch.txt | 2.47 KB | rjb |
#4 | feed.txt | 1.42 KB | enjoyaol |
#2 | feeds.txt | 1.77 KB | kuldip zala |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedCould you describe your feeds importer configuration in detail? (Feel free to do an export and **attach** the export as text file here). Thank you.
Setting this to non-critical as 'critical' is reserved for confirmed bugs with a fix scheduled to go into next release.
Comment #2
kuldip zala CreditAttribution: kuldip zala commentedExport configuration and attached.
Comment #3
alex_b CreditAttribution: alex_b commentedThanks - the configuration is actually looking good. When you install devel module and do a
dsm($item)
, then import - are there URLs and GUIDs present in these items?Comment #4
enjoyaol CreditAttribution: enjoyaol commentedHi Alex,
I'm having the same warning when I try to import nodes with the CSV parser.
The nodes are imported (example : Updated 2 Feed item nodes.) but I get this message:
user warning: Duplicate entry 'feed-17' for key 'PRIMARY' query: INSERT INTO feeds_source (id, feed_nid, config, source, batch) VALUES ('feed', 17, 'a:2:{s:16:\"FeedsFileFetcher\";a:2:{s:6:\"source\";s:36:\"sites/default/files/feeds/test_7.csv\";s:6:\"upload\";s:0:\"\";}s:14:\"FeedsCSVParser\";a:1:{s:9:\"delimiter\";s:1:\";\";}}', 'sites/default/files/feeds/test_7.csv', 'b:0;') in C:\xampp\htdocs\ecigcompare\includes\common.inc on line 3477.
And the nodes are not showing in the workspaces nor in the node list.
I 'm attaching my configuration as well. Hope it helps
Comment #5
aquila CreditAttribution: aquila commentedI am experiencing very similar problems, subscribing.
Comment #6
slicedsoup CreditAttribution: slicedsoup commentedyes same problem here
Comment #7
alex_b CreditAttribution: alex_b commented#4 - could you also post a(n anonymized version of) the CSV file you're importing?
Comment #8
cato CreditAttribution: cato commentedI've been hunting this error for a while now since it appears everytime I edit/import the feed.
The solution is to either quit updating the feed_nid field in DB or to remove it from the index.
Looking at the mysql log, it's clear that the db handling code for both Feeds and Feeds Image Grabber creates the same error: It tries to update the (unique) key field in the table(s) for no apparant reason.
Regards,
Christopher Cato
Comment #9
bropp CreditAttribution: bropp commentedI'm also getting this error when setting up a new feed. After it attempts to import new articles, I get the following errors:
Comment #10
rjb CreditAttribution: rjb commented#8 helped me to find the problem. Thanks!
The feeds module contains code like this:
First an update of the object is attempted. Then db_affected_rows() is called to check if the update succeeded. The programmer expected db_affected_rows() to return zero only if the object does not exist in the database. Then the object would be inserted.
However if the object does not differ from the one stored in the database, then db_affected_rows() also returns zero. If you think of it, this seems logical because no update was needed (the data is the same), but it was not expected by the programmer. Now the code will try to insert an already existing object (an object with the same key), causing the warning message to appear.
I'm working on a quick patch.
Cheers,
Ronald
Comment #11
rjb CreditAttribution: rjb commentedHere is the patch.
Now a "SELECT COUNT(*)" is used to check if the object already exists. If this is the case, then an UPDATE is performed else an INSERT is done. It works for me, but feel free to comment.
Cheers,
Ronald
Comment #12
batje CreditAttribution: batje commentedThis is indeed throwing errors. Ugly but a (temp) fix is
ALTER TABLE `feeds_source` DROP PRIMARY KEY ,
ADD INDEX `PRIMARYOLD` ( `id` , `feed_nid` )
Comment #13
ChaosD CreditAttribution: ChaosD commentediam getting this error, too - no matter what parser and mappign settings i use
subscribed
Comment #14
cato CreditAttribution: cato commented#10 Ronald, you're welcome.
Comment #15
alex_b CreditAttribution: alex_b commented#10 - thank you. #11 looks like the proper solution. Will review as soon as I get some time. Is #11 addressing the reported problems for everybody here?
Comment #16
ChaosD CreditAttribution: ChaosD commentedi can confirm that the errors are gone but now iam having trouble with something different. dont know if its releated so i opened a new issue
#810822: HTTP error 404 in import
Comment #17
TimG1 CreditAttribution: TimG1 commentedI'm not getting this error with feeds, but occasionally get it elsewhere with other modules. In my case it's due to MySQL 5.1.
http://www.palantir.net/blog/beware-mysql-51-my-son
Sorry to interrupt, but thought I'd share in case it's helpful/related.
Carry on... =)
-Tim
Comment #18
AlexisWilke CreditAttribution: AlexisWilke commentedHi guys,
I've got a similar problem with menu_per_role as pointed out by one of my users. The problem is the DEFAULT specification on PRIMARY keys. You have that one too. Because of that, the UPDATE will create a row when none are found. Yes, that's an incredible bug since such a row should not be created by an UPDATE statement, but it does...
Btw, thanks TimG1 who gave the answer in the link/post in his issue.
Anyway, I don't use MySQL so I cannot tell you for sure, but look into this:
Thank you.
Alexis Wilke
P.S. Btw, patch in #11 is a very slow work around in comparison! and the feed_update_xxx() should use db_field_set_no_default().
Comment #19
jamielennox CreditAttribution: jamielennox commentedsubscribing
Comment #20
AlexisWilke CreditAttribution: AlexisWilke commentedP.S. The DEFAULT is certainly a problem, but the real problem is MySQL. It's broken as of 5.1.<something>. There was a fix applied by Dries a in 2005, but it broke again.
So what I mentioned earlier should be fixed, but that won't make this problem go.
Thank you.
Alexis
Comment #21
smartinm CreditAttribution: smartinm commentedThe #11 patch actually works fine, but
SELECT COUNT(*)
do not perform well in InnoDB tables.I've attached the same patch using
db_query_range()
, more info in Do not use SELECT COUNT(*) to check for existence of rows in a table.Comment #22
smartinm CreditAttribution: smartinm commentedPatch with small comment typo fix introduced on #21.
Comment #23
alex_b CreditAttribution: alex_b commentedCommitted, thank you.
http://drupal.org/cvs?commit=382194