Closed (fixed)
Project:
Related links
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
20 Apr 2010 at 10:51 UTC
Updated:
16 Dec 2010 at 18:40 UTC
Jump to comment: Most recent file
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks_tracker (nid, keywords) VALUES (12296, '') in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 602.
Id love to use this module.. thanks for any help!
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | relatedlinks-patched.zip | 33.1 KB | holydrupal |
Comments
Comment #1
holydrupal commentedsame here!
Comment #2
holydrupal commentedI found it, change the line 848:
Comment #3
AntiNSA commentedIt was the wrong line... not 848, but 601. It helped, but I am still getting this error user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (18057, '/node/18342', 'Bird Group Warns that Oiled Birds Found Onshore May Be a Fraction of the Total Toll on Birds From Gulf Spill(Common Dreams Progressive Newswire)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 464.
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (18057, '/node/18007', 'Bears rescued from bile farm(Reuters Latest Videos)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 464.
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (18057, '/node/17791', 'Fears for Crops as Shock Figures From America Show Scale of Bee Catastrophe(Common Dreams News)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 464.
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (18057, '/node/17595', 'Snail Farming Could Save Endangered Gorillas(TreeHugger)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 464.
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (18057, '/node/17267', 'Vladimir Putin Hearts Polar Bears(TreeHugger)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 464.
any ideas? Thank you so much for your help on this!
Comment #4
holydrupal commentedI downloaded this patched version which is a complete module for drupal 6 without error
Comment #5
AntiNSA commentedwhen I used your patched attachment I receive :
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (5928, '/node/4780', 'Interview with Alex Steffen in The Sun(WorldChanging)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 710.
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (5928, '/node/4352', 'The Parable of the Electric Bike(WorldChanging)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 710.
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (5928, '/node/14368', 'The Architect\'s Role in a Warming World: Learning from Jamie Lerner(WorldChanging)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 710.
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (5928, '/node/16616', 'Climate change Indicators in the U.S.: Summary of Scientific Findings(WorldChanging)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 710.
user warning: Duplicate entry '255' for key 1 query: INSERT INTO relatedlinks (nid, url, title, type) VALUES (5928, '/node/12443', 'Bolivian Indigenous Activist: We Must Respect Mother Earth, Our Pachamama(DemocracyNow!)', 3) in /home/cyberfan/htdocs/sites/all/modules/relatedlinks/relatedlinks.module on line 710.
so fustrating :( Thanks for your help! any ideas?
Comment #6
AntiNSA commentedAh after uninstall and reinstall it worked! Thanks soooooo much! great module.
Comment #7
mattwmc commentedYeah, this just started happening to me for some reason a few moments ago as well.
Comment #8
MrSlayer commentedI think I may have figured out what is causing this problem. Since it is saying duplicate entry for key 255, I checked the database and the auto increment number was set to 256, but for some reason it was still entering 255 for the key. So, I checked the structure of the table and sure enough, the lid field (the auto increment field) data type was set to TINYINT(3). I changed this to INT(5) and it is working now. Since I'm not much of a DBA, I don't know how much of an impact this will have as far as optimization.
Comment #9
vinayras commentedThe fields "lid" and "nid" in "relatedlinks" table were set to TINYINT(3) - which can hold 255 entries at max. Same issue with "relatedlinks_tracker" table. This problem is happening on fresh D6 install also.
Just run following SQL statements to fix this issue.
Comment #10
umesh sharma commentedyes, its work , and resolve our issue thanks, thanks a lot.
Comment #11
mattwmc commented@#9 - Newbie, here. How do I do this?
Thanks!
Cool! Figured it out. http://www.ehow.com/how_2245774_run-sql-database-query.html
Comment #12
dagietje commentedHello,
I run the following SQL statements, but I get a error:
ALTER TABLE `relatedlinks` CHANGE `lid` `lid` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
CHANGE `nid` `nid` INT UNSIGNED NOT NULL DEFAULT '0' ALTER TABLE `relatedlinks_tracker` CHANGE `nid` `nid` INT UNSIGNED NOT NULL AUTO_INCREMENT
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `relatedlinks_tracker` CHANGE `nid` `nid` INT UNSIGNED NOT NULL AUTO' at line 4
Can someone help me?
Thx
Comment #13
dagietje commentedAnyone?
Thx
Comment #14
Zen commentedComment #15
Zen commentedThis has been fixed. For those of you with existing installs with this bug, please follow #9.
-K