I've got a problem with attaching a Link to a custom content type. The add / edit pages show the fields in the form, but on submission the following error comes up in the logs. I can verify that the columns don't exist in the database, although field_link_attributes does appear.

Unknown column 'field_link_url' in 'field list' query: SELECT field_link_url AS url, field_link_title AS title, field_link_attributes AS attributes FROM content_type_artsgroup WHERE vid = 94 LIMIT 0, 1 in /Volumes/DataHD/domroot/domartspoints/Sites/www/includes/database.mysql.inc on line 172.

I've removed the offending field and tried to re-add it to the content type, as well as starting from scratch by deleting and creating a new content type.
Both CCK and the Link module have been updated to the latest releases, to no avail.

Someone else was having a similar problem here: http://drupal.org/node/259036

Much thanks!

Comments

karens’s picture

Project: Content Construction Kit (CCK) » Link
Version: 5.x-1.7 » 5.x-1.x-dev
Component: General » Code

This is a Link module issue, not a CCK issue.

zwhalen’s picture

I have also experienced the same problem.

If it matters, I'm using MySQL 4.1.22, and PHP 5.2.0.

sonden’s picture

Same here:

MySQL 4.0.27, and PHP 5.2.6.

sonden’s picture

I upgraded to mysql 5 and now the links work smooth. I still have issues with other CCK fields though, so i am not sure if the main problem is solved after all ...

bjfresh’s picture

I'm on PHP 4.4.8, MySQL 4.1.22

mobabo’s picture

Similar problem here..

user warning: Unknown column 'field_links_url' in 'field list' query: INSERT INTO drupalcontent_field_links

I'll try to update my post with more info.

*update*

I seem to be using mysql 4.1.15, so that could very well be the problem. Unfortunately I can't upgrade... any ETA on a patch, or are there a few lines I could change myself?

seanr’s picture

The module attempts to create the data field in the table as varchar(1024) which is an invalid number. Max is 255. The module needs to use text or blob instead.

quicksketch’s picture

Ah, okay it looks like varchar was extended to 65535 bytes in mySQL 5.0.3, which explains why I wasn't have any trouble on my localhost of 5.0.41. We'll need to roll an upgrade path it seems to use a tinytext or mediumtext.

quicksketch’s picture

Status: Active » Closed (duplicate)