The link id sequence is hard-coded so having multiple sites sharing tables in a db won't work.

In links/links.inc ~ line 624, change $lid = db_next_id("links_lid"); to $lid = db_next_id('{links_lid}');

Comments

cmb’s picture

Version: 5.x-1.7 » 5.x-1.8

This was fixed in 5.x-1.8 but it really messes up any upgrade of a site with a prefix. Since the Link ID starts at 1 again and new links try and try to add links with previously used link_ids. The way to fix it if you've already upgraded is to manually change your

link_id entry in sequences. The module maintainer should check at install if sequence link_id is greater then link_id and seed link_id with the same number. Ben
Timotheos’s picture

The way to fix it if you've already upgraded is to manually change your link_id entry in sequences.

Thanks Ben that fixed it. Just a note to anybody else is you're looking in the table {yourdb}_sequences and changing the value of the {yourdb}_links_lid to the same as the value in links_lid.

syscrusher’s picture

Assigned: Unassigned » syscrusher
Status: Active » Fixed

Verified that this issue is fixed in the current releases of Links for D5 and D6. The issue will remain searchable for anyone upgrading from older versions, but this should not recur with new installations.

Thanks for the notes.

Kind regards,

Scott

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.