Hi

We have recently upgraded from drupal 6.26 to drupal 6.28. We are having an issue that the content is saved to the node table but not to the content_type table.

I can see that there is a php error being thrown as follows:

Unknown column 'field_add_child_business_value' in 'field list' query: INSERT INTO default_content_type_meeting_business (vid, nid, field_add_child_business_value, field_add_child_attachment_value, field_add_sibling_business_value, field_index_formatted_value, field_prefix_value) VALUES (58856, 47599, 47599, 0, 46921, '3', '4') in xx/public_html/sites/all/modules/cck/content.module on line 1213.

The column ‘field_add_child_business’ does not exist in the table for the content type meeting_business ie content_type_meeting_business. This would explain the problem. However, the column did not exist before the upgrade before yet there was no error and the content was stored appropriately.

field_add_child_business is a computed field with the following code:

if (!$node->nid) node_save($node);
$nid = $node->nid;
$node_field[0]['value'] = $nid;

The structure of ‘content_type_meeting_business’ is:
vid int(10) UNSIGNED No 0
nid int(10) UNSIGNED No 0
field_index_formatted_value varchar(50) utf8_general_ci
field_prefix_value longtext utf8_general_ci

I am at a loss to explain this. Not how it broke but how it worked before. To my understanding, it should never have worked without those columns but it did. I would really appreciate your help. Could this be a stricter bit of code in Drupal 6.28

Thanks
Chris

Please note this has been logged in the following 3 places. I will update them all with any resolution but am unsure where the problem lies:

http://drupal.org/node/1951768
http://drupal.org/node/1951766
http://drupal.org/node/1951770

Comments

macman’s picture

Status: Active » Fixed

I have resolved this issue. The resolution was to store the computed fields in the database. The confusing thing for me is that I can't really work out how this was working before without db storage but that certainly resolved the issue. It created the columns in the content type table to store the computed fields. Perhaps changes to the core meant that some bit of code was stricter than it used to be.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

updated to show other places I logged it