Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Link insertion error

Quote Reply
Link insertion error
Hi Everyone,

We are suddenly getting the following error when we try to add a link to our directory:

Failed to execute query: 'INSERT INTO glinks_Links (isPopular,Status,Contact_Email,ExpiryDate,Mod_Date,ExpiryNotify,Votes,Keywords,Tracking_Image,isChanged,Promotional_Text,Date_Checked,Available,Secondary_Category,From_Price,URL,ExpiryCounted,Network,Short_Description,Price,Retail_Price,isValidated,Brand_Name,Contact_Name,Product_URL,Title,Add_Date,Image_URL,Hits,Merchant_Name,Rating,isNew,LinkOwner,Third_Party_Category,Last_Updated,Advertiser_Category,Sale_Price,Description,SKU,Timestmp,ID) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,NOW(),NULL)': Column 'ID' cannot be null

I already checked to see if the link "ID" column was set to null, and it is not.

Any advice on how to resolve this is greatly appreciated!

Quote Reply
Re: [ATKOgirl] Link insertion error In reply to
One possible reason this is happenning is that your def file is wrong. Check your <prefix>Links.def file and make sure that the ID column doesn't have a default key (just delete it). It should look something like:
'ID' => {
'form_display' => 'ID',
'form_size' => '10',
'form_type' => 'TEXT',
'not_null' => '1',
'pos' => '1',
'regex' => '^\d+$',
'type' => 'INT',
'unsigned' => '1'