Closed (fixed)
Project:
Date
Version:
6.x-2.0-beta2
Component:
Date CCK Field
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2008 at 14:38 UTC
Updated:
26 Jun 2008 at 13:12 UTC
The DB update from Date 5.x-1.8 to 6.x-1.0-beta fails at line 334 of date.install (Call to undefined function content_alter_db_field()).
(CCK 6.x-1.0-alpha)
Comments
Comment #1
webernet commentedComment #2
spcalpo commentedI'm having the same problem right now with update 5202. (I am updating from drupal 5.7 to 6.2)
Hoping there'll be a fix for this soon... or is there a better version for me to install (cvs, head)? The version of date I had in drupal 5.7 was Date 5.x-1.8, and the one I am updating to is 6.x-1.0-beta.
EDIT: I believe the problem is that the function content_alter_db_field() (a CCK function which date uses to update fields) is in a 5.x version of CCK but not the 6.x one. Looking at the 6.x version of content.admin.inc, but haven't yet quite figured how the new content_alter* functions work to duplicate what content_alter_db_field() did.
Sally
Comment #3
karens commentedI just released a new 6.2-beta2 version for Date, so update to the latest code for Date and also get the latest -dev version of the Views module, which has some date-related changes that are needed for the Date views handling. If you use the Calendar module, get the new 6.2-beta2 version of that as well.
If you still have problems after that, open a new issue marked with the beta2 version so I know it's still a problem there.
Comment #4
webernet commentedThis is still an issue. (date.install, line 375)
content_alter_db_field() doesn't exist in CCK 6.x.
The obvious work around is to update from 5.x-1.x to 5.x-2.x prior to the update to 6.x-2.x.
Calling API functions in updates is bad practice since there is no guarantee the same functions will still be around or work the same way when the update is actually run.
Comment #5
karens commented@webernet - I know it's bad practice, but CCK has to do it too because the changes needed are way too complex to do this any other way.
Looks like I need to change the function in the D6 install file to match the D6 CCK version, that would make it work right even if you hadn't run that update in D5.
Comment #6
karens commentedFix committed.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.