Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.0-rc7
Component:
content.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Sep 2008 at 11:00 UTC
Updated:
10 Oct 2008 at 14:52 UTC
I create content.
I fill out all mandatory fields.
After press save this occurs.
user warning: Unknown column 'field_distance_info_value' in 'field list' query: INSERT INTO content_type_apartment (vid, nid, field_xxx, ....... " A LOT OF CCK FIELDS WHICH I HAVE") VALUES (33, 33, NULL, 0, 0, 0, 's', NULL, NULL, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0) in /xxx/sites/all/modules/cck/content.module on line 1099.
Thanks for any idea.
Comments
Comment #1
sentinelcz commentedI see that there is only fields with VALUE.... field_xxx_value, field_yyy_value,field_zzz_value,
Comment #2
yched commentedWhat are the fields in this content type ?
Please enable content_copy module, 'export' this content type's defintion and paste it here (enclosed between
tags so that formatting is preserved)Comment #3
yched commentedAlso : is this a fresh CCK RC7 install, or does it come from a previous version, (previous D6 CCK, former D5 site...)
Comment #4
sentinelcz commentedImportant information:
I created new content type and I used function: Add existing filed (from another content type).
Interesting is that after export I see information from another content type where is the field too.
----------------------------------------------------------------------------------------------
I install clean D6 with official version of CCK.
After that I install dev. version.
After that I updated from previous dev version of CCK to rc7.
With CCK I updated views module.
----------------------------------------------------------------------------------------------
I export code for you and I can see this:
* user warning: Unknown column 'field_distance_info_value' in 'field list' query: INSERT INTO content_field_distance_info (vid, nid, field_distance_info_value) SELECT vid, nid, field_distance_info_value FROM content_type_testaaa in /home/xxx/sites/all/modules/cck/includes/content.admin.inc on line 1436.
* user warning: Can't DROP 'field_distance_info_value'; check that column/key exists query: ALTER TABLE content_type_testaaa DROP field_distance_info_value in /home/xxx/includes/database.mysql-common.inc on line 322.
----------------------------------------------------------------------------------------------
Code is:
$content[type] = array (
'name' => 'Test',
'type' => 'property',
'description' => 'Add new info.',
'title_label' => 'Title',
'body_label' => '',
'min_word_count' => '0',
'help' => '',
'node_options' =>
array (
'status' => true,
'promote' => true,
'sticky' => false,
'revision' => false,
),
'language_content_type' => '0',
'nodewords' => 1,
'old_type' => 'property',
'orig_type' => '',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '0',
'comment' => '2',
'comment_default_mode' => '4',
'comment_default_order' => '1',
'comment_default_per_page' => '50',
'comment_controls' => '3',
'comment_anonymous' => 0,
'comment_subject_field' => '1',
'comment_preview' => '1',
'comment_form_location' => '0',
);
$content[fields] = array (
0 =>
array (
'label' => 'Distance info',
'field_name' => 'field_distance_info',
'type' => 'text',
'widget_type' => 'text_textarea',
'change' => 'Change basic information',
'weight' => '19',
'rows' => '5',
'size' => 60,
'description' => '',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' => NULL,
'group' => 'group_distances',
'required' => 0,
'multiple' => '0',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'text',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
),
'teaser' =>
array (
'format' => 'default',
),
'full' =>
array (
'format' => 'default',
),
4 =>
array (
'format' => 'default',
),
),
),
);
Comment #5
yched commentedHave you tried clearing your sites cache ?
admin/settings/performance, hit 'Clear cached data' button at the bottom of the page.
Comment #6
sentinelcz commented@yched: Yes, I did it.
Comment #7
sentinelcz commentedI will try to delete problematic content and I will create new one. I will let you know. Thanks for answer.
Comment #8
sentinelcz commentedI did it but seems that problem is still there. After fill out content , some fields are mandatory, I fill out all mandatory fields, and occurs message described over AND AFTER THAT I HAVE STILL some mandatory fields as is not filled.
I don't understand it.
Comment #9
yched commentedPlease give as much detail as you can about your MySQL config
Comment #10
sentinelcz commentedI sent it to you via personal contact.
If you need some additional information let me know.
THKS for help.
Comment #11
sentinelcz commentedI solved problem. I hope that this step by step process helps to others.
I am using two content types:
”Content type A” and ”content type B”.
I have in both content types part of the same cck fields.
In ”Content type A” I deleted obviously problematic field_country_info.
After that I wanted create the same field but !!! drupal gives me the message that filed already exist !!! This was wrong message because I deleted it in one step before.
NOTE: Do you know anybody How I can check CCK field consistency or find similar problematic fields?
If it was not possible to create field with standard function “Create New Field” - drupal gives me message that filed already exist.
I used function “Add existing field” (I took the field_country_info from content type B”.) And that’s works.
Data from field_country_info were lost , of course, but will try to export them from backup database, and import them to current.
If somebody know how can I do it quickly , let me know .
Thank you.
Comment #12
yched commentedI don't really understand you previous post, you're not being clear enough for me to follow what you did at what point, but in short :
You can't create two fields with the same name. If you want to use a field in several content types, then you need it create it ('add new field') in one of of the content types, and then share it ('add existing field') in the other content types.
After that, if you remove it from one content type, it still exists on the others, so trying to add it as a 'new field' won't work.
What I don't get is : were you able to figure a step-by-step method to reproduce the "Unknown column" error you had ?
Comment #13
sentinelcz commentedOK, thanks for confirmation. It is working as you wrote. So we can close this part about sharing fields.
After deleting one field I cant reproduce the problem "Unknown column" but give me some time I will test deeply.
I remember Step by step procedure because the problem was in each content:
I created several contents without problems.
I updated CCK version to rc7 (from previous official).
I open some content.
Program gives me message that two fieds meeds fill in because they are requierd.
Point1: I hat these fields filled in.
So I filled first field again, after that second field too.
And after that I tried to save content.
And appears message "Unknown column......" and content was updated.
I can see filled out two fields but If I press "edit" button, and I try to saved it without any changes, message appears again two field are mandatory.
Comment #14
karens commentedIt sounds like the remaining problem is the same as the report #311146: Adding a field, so follow up there. But I can't replicate that problem.
Comment #15
sentinelcz commentedAfter update module, I cant reproduce problem too.
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.