When trying to add new content with date fields in it, I get this error:

Fatal error: Cannot unset string offsets in /var/www/sites/all/modules/date/date/date_elements.inc on line 280

MySQL database 5.0.67
PHP 5.2.6-2ubuntu4
Web server Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch

Drupal 6.6

Content Construction Kit (CCK) 6.x-2.1

Date 6.x-2.0-rc6

Calendar 6.x-2.0-rc6

Views 6.x-2.x-dev (2008-Nov-07)

Comments

webwriter’s picture

Version: 6.x-2.x-dev » 6.x-2.0-rc6

Changing Version- sorry!

john morahan’s picture

I had the same problem; deleting and recreating the field made it go away, so I guess it only applies to upgrades and not new installs. I upgraded from rc4 to rc6 if that helps

geoffreyr’s picture

Reporting what could be a similar error, also within rc6. When I attempt to edit a CCK field within a content type, I get the following error:

PHP Fatal error: Cannot unset string offsets in /var/www/sites/all/modules/cck/includes/content.node_form.inc on line 77

Was working fine in dev version before rc6's release. Same error shows regardless of whether CCK is 2.0 or 2.1.

karens’s picture

Status: Active » Postponed (maintainer needs more info)

The latest CCK code doesn't have an unset on the that line number, so it could be an outdated version of CCK. If you are getting an error on the closest unset I can find to that line, line 71, that would be a CCK bug because CCK is unsetting a value that might not be there without checking if it is.

But first someone has to confirm that you still get this message with the latest -dev version of both Date and CCK.

karens’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

No response in the last month, lots of changes since it was posted, no idea if it still applies to the latest code, and not enough information to replicate the issue if it is still a problem in the latest code.

UnicornSong’s picture

Status: Closed (won't fix) » Active

Hi there.

I was experiencing this while trying to play around with the bookings api, so i started a Fresh site, using CCK 6.x-2.1 and Date 6.x-2.0-rc6 on Drupal 6.9

as soon as i enabled the date_api i received this error:
Fatal error: Cannot redeclare date_api_views_data() (previously declared in C:\xampp\htdocs\drupal6\sites\all\modules\date\includes\date_api.views.inc:123) in C:\xampp\htdocs\drupal6\sites\all\modules\date\date_api.views.inc on line 58

edit: i downgraded the date module to 6.x-2.0-beta3 and all is well

karens’s picture

Status: Active » Postponed (maintainer needs more info)

Messages about previously declared variables indicate you have more than one copy of some files or you have old files that should have been cleaned out. You need to empty date and calendar folders and put the latest code in. The rc6 version is very out of date now and there have been lots a fixes since (I am almost ready for another release) so you need to use the latest -dev code for both to be able to tell if the current code is working or not. Reporting bugs in the rc6 version won't tell me if there are still problems in the latest code.

muka’s picture

Hello, with the same problem (date-2.0-rc6 cck2-dev D6.6)

I've solved removing the date module folder and repasted again.

bye L

karens’s picture

Status: Postponed (maintainer needs more info) » Fixed

So this is not a bug.

Status: Fixed » Closed (fixed)

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