Duplicate Insert Error and Only one link updated on each leech
| Project: | Leech |
| Version: | 5.x-1.x-dev |
| Component: | leech |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Aron Novak |
| Status: | closed |
Jump to:
I am very happy to see this module and I really need this. I get duplicate entry error when leech is done,
Source URL: http://news.google.com/news?hl=en&ned=us&q=climate+change&ie=UTF-8&outpu...
Error:
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '564-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 564) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '564-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 564) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '624-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 624) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '548-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 548) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '564-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 564) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '624-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 624) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '548-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 548) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '292-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 292) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '584-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 584) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '548-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 548) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
* user warning: Duplicate entry '545-239' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (239, 545) in /home/.........../public_html/.........../includes/database.mysql.inc on line 121.
This error goes on and on for many pages and so I have given few here. This happens each time when I leech manually or by cron run.
I get only one item updated each time either on Cron run or Manual leech, it also says that some for eg. 2 duplicates found.
I have all the required modules installed and followed the instructions specified in the README.txt. Kindly help me to fix this issue up. I require leech to get news as feeds from various aggregator sources and update them.

#1
It's something about the leech_yahoo_terms module.
Please try out that removing /* */ around the line no. 200 - 245 (leech/leech_yahoo_terms/leech_yahoo_terms.module - leech_yahoo_terms_settings() function). Then visit the admin/settings/leech_yahoo_terms page, save the defaults and try again. Thanks!
#2
Hi Aron,
Thanks for your prompt response.
Only 1 feed is getting updated whenever leech happens either manually or by cron run. For eg I am using the URL
http://news.google.com/news?hl=en&ned=us&q=disaster+risk+reduction&ie=UT...
http://news.google.com/news?hl=en&ned=us&q=adaptation&ie=UTF-8&output=rs...
But when I leech this manually it says 0 items added, 1 duplicates found. Please help to fix up this. This could be great help.
The duplication error still exists.
# user warning: Duplicate entry '386-277' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (277, 386) in /home/......./public_html/...../includes/database.mysql.inc on line 121.
# user warning: Duplicate entry '545-277' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (277, 545) in /home/......../public_html/..../includes/database.mysql.inc on line 121.
# user warning: Duplicate entry '2060-277' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (277, 2060) in /home/........./public_html/....../includes/database.mysql.inc on line 121.
# user warning: Duplicate entry '2060-277' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (277, 2060) in /home/......../public_html/........./includes/database.mysql.inc on line 121.
The following error has shown up when I have removed the commenting from line no 200 to 245 in leech_yahoo_terms and I have assigned $current = array(); in line number 207 to fix up that.
Warning: Cannot use a scalar value as an array in /..../...../public_html/..../.../modules/leech/leech_yahoo_terms in line 219.
Thanks in advance.
#3
Hi Aron,
Sometimes I am getting this duplication error and sometimes not. I have created new leech and it is not showing up any duplication errors.
But it updates only 1 item that too on first leech and after that it is not updating the items. This is the major problem im getting. The url is http://news.google.com/news?hl=en&ned=us&q=climatic+vulnerabilities&ie=U...
Thanks
#4
I added this feed to my dev site (latest leech) and the leech module created all the three articles that is in the feed. (I checked w/ Akregator that only 3 items is in the feed at the moment) . Please send me the content of the {variable] sql table and the content of the {leech_news_feed table}! With this info, maybe I can find out the problem.
#5
Hi aron,
same here with a fresh drupal 5.1 installation and the actual 5x1xdev of Leech...
I will try your fix from January 27 now and let's see if it works.
#6
Hmmm. Faling with that. Could tell me exactly which part I should remove?
#7
There is a huge chunk of commented out code in leech_yahoo_terms. Aron meant you should try to get that code in again.
I would try sth else before: deactivate leech_yahoo_terms and see, wether the error really is because of that module.
Alex
#8
Okay, I tried this on an 4.7.6 and it seems to work. During the leech run there was no error. I will monitor this and keep you informed if the error shows up again.
Thank you!
#9
funana - yeah!!!
#10
Yo Alex,
I fear I have to take it back... I didnt save the yahoo_terms module after uploading the changed version. Now I saved it under settings and the following error shows up:
‚Cannot use a scalar value as an array‘ in ‚/home/www/doc/1111/site.com/www/modules/leech/leech_yahoo_terms/leech_yahoo_terms.module‘ in Line 219.
When I tried to remember if I saved the yahoo settings the last time I got in trouble with the .dev version of leech I could not remember. So maybe all the trouble was caused by me, not saving the changed yahoo module when upgrading to the dev.
But Im a little bit scared of the dev version right now because I created a bad loop back then and my provider switched the page off for 3 hours.
Sorry for beeing rash... damn :-(
I will keep you up to date...
Any help with the Duplicate Insert Error still appreciated, thank you.
#11
The latest dev version has a new database structure check out what changed in the .install file. As we are currently working on a new leech release, there is no upgrade function yet.
#12
I am so glad that you guys continue your work on leech and are planning to release a new version. This module has a very good potential and should be improved - I foresee victory :-)
Thank you for all your work!
P.S.: Could you pls. have a look at the localizer issue again? Language support is crucial and this would be the rocker! Roberto will help you if you have any questions about localizer.
#13
I too am getting a similar error.
Feed: http://feeds.feedburner.com/ArticlesRepository
Error:
user warning: Duplicate entry 'http://feeds.feedburner.com/ArticlesRepository' for key 2 query: INSERT INTO a4all_leech (nid, url, refresh, news_last_arrived, adaptive) VALUES (7, 'http://feeds.feedburner.com/ArticlesRepository', 0, 1171146551, 1) in /home/.kader/a4adeveloper/www.articles4all.net/includes/database.mysql.inc on line 172.
1 item(s) added, 0 duplicate(s) found.
Only one item is inserted,
#14
Do you use PHP5? If the answer is yes please see http://drupal.org/node/111453 this issue, leech behave extremly strange w/ PHP5. It's a critical bug of course. All versions of leech are affected!
#15
That's it: http://drupal.org/node/111453
Please let me know that this really solves the issue or not.
#16