I had a small problem with upgrading the CCK module during the transition from Drupal 5 to Drupal 6. I use the
Link module to have a link field (the field name is "url") in a custom content type (named "link"). However after the upgrade whenever I added or updated a node of this content type, the value of the url field was empty. In the Drupal log I saw errors like this:
Column 'field_url_title' cannot be null query: INSERT INTO content_type_link (vid, nid, field_url_url, field_url_title, field_url_attributes, field_link_value) VALUES (4440, 4439, 'http://example.com/', NULL, 'N;', '<a href=\"http://example.com//\">Some link</a>') in /var/www/mysite/sites/all/modules/cck/content.module on line 1200.
(The
field_link_value column in the table belongs to a computed field, but that's not relevant to this problem.)
During debugging the issue I've created a new content type with similiar fields (but new field names) as the one I had problem with. It turned out that the
content_type_link database table had its
field_url_title column set to "not null", while the new content type's table had the same column set as nullable. That was the reason for the errors and changing the table structure of the original content type solved the problem completely.
I'm not 100% sure, but my best guess is that this is a problem in the upgrade code of the
CCK module and not a problem with the Link module. On the other hand, I might be responsible for the problem since I've skipped a step in the CCK upgrade path: I forgot to upgrade the CCK module to the latest 5.x version before upgrading Drupal to 6.x.
Recent comments
2 days 18 hours ago
2 days 18 hours ago
4 days 23 hours ago
1 week 2 days ago
1 week 2 days ago
1 week 3 days ago
1 week 3 days ago
1 week 4 days ago
1 week 5 days ago
2 weeks 1 day ago