I tried to create a new cck-date-field "geburtsdatum" with following settings:
date, select list, day, month, year (without hour,minute,second, because its a birthday) and repeating
After saving, the following error message is shown:
user warning: Duplicate entry '44-0' for key 1 query: INSERT INTO content_field_geburtsdatum (vid, nid, delta, field_geburtsdatum_value) SELECT vid, nid, 0, field_geburtsdatum_value FROM content_type_portrait in /mnt/web1/31/45/51628845/htdocs/sites/all/modules/cck/includes/content.admin.inc on line 1128.
What's wrong ?
I think, the problem is the input format.
If i set a custom input format "d.m.Y" , there is no error message.
But if I create a new node with a birthday for example 19.06.1964 and settings Frequency "Every" "Year", there is a new error message:
user warning: Duplicate entry '44-0' for key 1 query: INSERT INTO content_field_geburtsdatum (vid, nid, delta, field_geburtsdatum_value, field_geburtsdatum_value2, field_geburtsdatum_rrule) VALUES (44, 44, 0, NULL, NULL, NULL) in /mnt/web1/31/45/51628845/htdocs/sites/all/modules/cck/content.module on line 1067.
The shown date is: 01.01.2008

Is it a cck problem or a date modul (newest dev) error ?

Comments

Micha1111’s picture

There is the same error with the newest versions of cck-dev (12.05.08) and date-dev (11.05.08)

karens’s picture

Status: Active » Closed (duplicate)

This appears to be a CCK error creating new field tables. There is a report and a proposed patch to fix it in the CCK queue, so I won't move this issue over there.

Micha1111’s picture

Status: Closed (duplicate) » Active

Where can I find this report and proposed patch ?

Micha1111’s picture

the same error with both newest versions cck and date (14.05.08)
user warning: Duplicate entry '107-0' for key 1 query: INSERT INTO content_field_geburtstag (vid, nid, delta, field_geburtstag_value, field_geburtstag_value2, field_geburtstag_rrule) VALUES (107, 106, 0, NULL, NULL, NULL) in .../sites/all/modules/cck/content.module on line 1072.
set date: 19.06.1964
shown date: 01.01.2008

Micha1111’s picture

the same error with both newest versions cck and date (31.05.08)
If I create a new datefield (parameter required and 1), the field is stored in database table content_node_field and content_node_field_instances (columns: required=1, multiple=0, dbstorage=1)
If I delete this field, the field is deleted in database tables too.
If I create a new datefield (parameter required=1 and REPEATING), the field is stored in database table content_node_field and content_node_field_instances (columns: required=1, multiple=1, dbstorage=0) and there is a new table content_field_newdate (first row => vid=105, nid=104, delta=0, value=Null, value2=Null, rrule=Null, second row => vid=106, nid=105, delta=0, value=Null, value2=Null, rrule=Null)
After saving the first new date (for example 10.06.08) with repeating parameters (every year, Enddate 01.07.2010), nothing is stored but the first row is changed to vid=105, nid=104, delta=0, value=U, value2=U, rrule=U
The shown date is 01.01.2008 and there the following error messages:
warning: preg_match() expects parameter 2 to be string, array given in /mnt/web1/31/45/51628845/htdocs/sites/all/modules/date/date_api.module on line 929.
warning: preg_match() expects parameter 2 to be string, array given in /mnt/web1/31/45/51628845/htdocs/sites/all/modules/date/date_api.module on line 929.
user warning: Duplicate entry '105-0' for key 1 query: INSERT INTO content_field_newdate (vid, nid, delta, field_newdate_value, field_newdate_value2, field_newdate_rrule) VALUES (105, 104, 0, NULL, NULL, NULL) in /mnt/web1/31/45/51628845/htdocs/sites/all/modules/cck/content.module on line 1078.
user warning: Duplicate entry '105-0' for key 1 query: INSERT INTO content_field_newdate (vid, nid, delta, field_newdate_value, field_newdate_value2, field_newdate_rrule) VALUES (105, 104, 0, NULL, NULL, NULL) in /mnt/web1/31/45/51628845/htdocs/sites/all/modules/cck/content.module on line 1078.
user warning: Duplicate entry '105-0' for key 1 query: INSERT INTO content_field_newdate (vid, nid, delta, field_newdate_value, field_newdate_value2, field_newdate_rrule) VALUES (105, 104, 0, NULL, NULL, NULL) in /mnt/web1/31/45/51628845/htdocs/sites/all/modules/cck/content.module on line 1078.
user warning: Duplicate entry '105-0' for key 1 query: INSERT INTO content_field_newdate (vid, nid, delta, field_newdate_value, field_newdate_value2, field_newdate_rrule) VALUES (105, 104, 0, NULL, NULL, NULL) in /mnt/web1/31/45/51628845/htdocs/sites/all/modules/cck/content.module on line 1078.
If I delete the field newdate, the database table content_field_newdate isn't deleted
Is it cck or a date problem ?
What can I do ?

karens’s picture

Project: Content Construction Kit (CCK) » Date
Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: content.module » Code
Assigned: Micha1111 » Unassigned
Status: Active » Postponed (maintainer needs more info)

Problems with date fields are Date field issues, but I don't know that this still applies in latest code.

schildi’s picture

Hope I post this comment to the right queue.

Currently I have a Drupal.5.12 installation running without a harm.
When migration to DRUPAL-6.6 a applied the most recent modules / patched I can find, e.g.

cck 6.x-2.0-rc10
imagefield 6.x-3.0-alpha2
filefield 6.x-3.0-alpha5
imageAPI 6.x-1.0

Surprisingly I found that a node (story) did not show up in the way I expected.
This node has a couple of images attached to it as FILES. That means I did NOT use imagefield in this special case. But I set up a table in the body text of the node and placed the images in the cells using links like

	<td><img src="/files/imagecache/scale_medium/img_3028.jpg" width="100%" /></td>

this worked in 5.12, but in 6.4 the cells didn't show the images any more.
I found that I had to correct the URL and changed it to

<td><img src="/files/imagecache/scale_medium/files/img_3028.jpg" width="100%" /></td>

After saving the changed node (attached files were not touched) I got the message

user warning: Column 'field_attach_image_fid' cannot be null query: content_write_record /* ... content_write_record */ INSERT INTO content_field_attach_image (vid, nid, delta, field_attach_image_fid, field_attach_image_list, field_attach_image_data) VALUES (11775, 7944, 0, NULL, NULL, NULL) in .../sites/all/modules/cck/content.module on line 1142.

I checked that neither in the current installation nor in DRUPAL-5.12 my table content_field_attach_image contains a record with nid=7944.
But this seems to be OK since the attached files are NOT managed by cck.

Is it possible that some CCK code is executed even when the attached data is not managed by CCK?

karens’s picture

Status: Postponed (maintainer needs more info) » Fixed

#7 You are not even using a date field and your errors are obviously with image module, so you have definitely posted in the wrong place. This is an issue about a specific problem with the Date module.

I doubt the original issue still applies since there have been many many many changes in Date and CCK since then and there is no update saying it is still an issue.

schildi’s picture

Thanks for replying, Karen

I will check this again when updating CCK code.

Status: Fixed » Closed (fixed)

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