PHP version: 5.2.5, Drupal 6.4
I'm not sure if this lands in CCK proper or in Date. I've got the latest (6.x-2.x-dev) version of Date (including reinstalling it twice), which I upgraded to because I was seeing this error:
Fatal error: Cannot unset string offsets in C:\wamp\www\drupal-6.2\sites\all\modules\date\date\date_elements.inc on line 280.
In attempting to file this bug report, I enabled content copy in order to export the field, and went to the Content type -> field and hit Configure that's when I got this error that points at CCK:
Fatal error: Cannot unset string offsets in C:\wamp\www\drupal-6.2\sites\all\modules\cck\includes\content.node_form.inc on line 57
So now I can't edit the field. Doh. It's a pretty simple field, using Datetime as the type and one of the default formats for dates. This field did work before, but since the last time I looked at it, I've upgraded to D6.4, Date, and CCK, so I don't know for sure if I've messed something up, or if it's not me, which of the 3 upgrades might be the root cause. I'm more inclined to think it's CCK as it's line 57 is an unset: unset($items[$field['field_name'] .'_add_more']);
I feel like this isn't very helpful information-wise - I've marked it critical because I can not edit the field, nor can I use the content type with the date field defined. I can edit other created fields without a problem. Even stranger, I created a new Date field using datetime as the type and it's working normally.
Comments
Comment #1
karens commentedThis is a Date problem, but it might be related to #283985: Content copy destroys field settings, which I am working on now.
Comment #2
karens commentedI can't replicate the problem, so I'm not sure what to do. There was definitely a problem with Content Copy, and fixes have been committed for that. But if you were seeing a problem originally that was unrelated to Content Copy, I'm not sure what happened.
It definitely sounds like your date settings got corrupted somehow, and using Content Copy was doing that before it got fixed.
Do you have data you will lose if that date field isn't fixed? If so, let me know and I'll try to help you un-corrupt it, otherwise I would just delete it and start over.
Comment #3
karens commentedThere are new releases of Date, Calendar, Views, and CCK and you need all of them. See if you still have a problem with the latest code.
Since there was no response to the previous message in several weeks, marking it fixed unless you find it is still a problem in latest version.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
TxAvA commentedArrrgh!, Same problem with latest dev versions (cck included):
When I try to edit Date field:
Fatal error: Cannot unset string offsets in modules/cck/includes/content.node_form.inc on line 77
If I comment these line 77, I get:
Fatal error: Cannot use string offset as an array in modules/date/date/date_elements.inc on line 150
And I can't create new content from content types if they got Date field! (Blank page)
Comment #6
TxAvA commentedUf, solved. I forgot to enable Date Pop-up
Comment #7
webdevbyjoss commentedHi, I have the same problem while calling
my content type created with cck using couple additional text fields.