just installed the Date module and get these messages when trying to update the database. Any help is appreciated!

date module can not be updated. Its schema version is 7. Updates up to and including 5210 have been removed in this release. In order to update date module, you will first need to upgrade to the last version in which these updates were available.

date_api module can not be updated. Its schema version is 0. Updates up to and including 5201 have been removed in this release. In order to update date_api module, you will first need to upgrade to the last version in which these updates were available.

Files: 
CommentFileSizeAuthor
#12 date.txt30.92 KBsja1

Comments

By the way Im running Drupal 6.19

Also I get this warning:

user warning: Table 'XXXXX.date_format_types' doesn't exist query: SELECT dft.type, dft.title, dft.locked FROM date_format_types dft ORDER BY dft.title in /home6/xxxxxx/public_html/yyyyyyy/modules/date/date_api.module on line 2014.

Status:Active» Needs review

Just solved this (let me know if its correct)

I created the tables that were given the warning errors (they werent created during the module installation and I dont know why)

CREATE TABLE date_format_types ( `type` VARCHAR(255) NOT NULL, `title` VARCHAR(255) NOT NULL, `locked` TINYINT NOT NULL DEFAULT 0, PRIMARY KEY (type) )
CREATE TABLE date_format_locale ( `format` VARCHAR(255) NOT NULL, `type` VARCHAR(255) NOT NULL, `language` VARCHAR(12) NOT NULL, PRIMARY KEY (type, language) )
CREATE TABLE date_format ( `dfid` INT unsigned NOT NULL auto_increment, `format` VARCHAR(255) NOT NULL, `type` VARCHAR(255) NOT NULL, `locked` TINYINT NOT NULL DEFAULT 0, PRIMARY KEY (dfid), UNIQUE KEY format (format) )

I realised later that "date_format" was the old name for that table so I updated it according this post

http://drupal.org/node/551692

The following commands were executed:

ALTER TABLE date_format RENAME TO date_formats
ALTER TABLE date_formats DROP KEY format
ALTER TABLE date_formats ADD UNIQUE KEY formats (format, type)
ALTER TABLE date_formats CHANGE format format VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
ALTER TABLE date_format_locale CHANGE format format VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL

To correct the other errors during the database update:

date module can not be updated. Its schema version is 7. Updates up to and including 5210 have been removed in this release. In order to update date module, you will first need to upgrade to the last version in which these updates were available.
date_api module can not be updated. Its schema version is 0. Updates up to and including 5201 have been removed in this release. In order to update date_api module, you will first need to upgrade to the last version in which these updates were available.

I just went to the table system, looked for the row corresponding the date and date api and changed the schema version in both cases to 6000.

After doing all this there was still a warning during the database update

warning: array_pop() [function.array-pop]: The argument should be an array in /home6/curefans/public_html/listadark/update.php on line 314. In the status report there are not error messages, thought.

solved all these problems but got a new one: the date field wont show up :( the information (the date) is there but it wont show up in the node.

issue 4 corrected deleting the cck date field and created a new one.

I have just upgraded today. Drupal 6.19 and Date 6.x.2.6.

Now getting some nasty messages:

user warning: Unknown column 'node_data_field_fixture_date.field_datetime_value' in 'where clause' query: .... QUERY REMOVED ...
in ~//wellsrfc.co.uk/sites/all/modules/views/includes/view.inc on line 775.

From what I noticed during the update.php script, no queries were executed for the Date module.

Any thoughts? Right now I am considering reverting to 2.4

This seems to have worked for me. Thank you!

@maxweld:
Your issue is a duplicate of this one: #580178: Views: SQL Error "Unknown column" when using fields from different content-types in a filter

Not sure abut the rest of the issue, which the original reporter has rectified.
Is this some edge case that can be closed, or does something need to be fixed to prevent this?

While upgrading a 5.x site to 6.19, (Date 5.x 2.8 to Date 6.x 2.6) I got almost the same error:

"date module can not be updated. Its schema version is 5104. Updates up to and including 5210 have been removed in this release. In order to update date module, you will first need to upgrade to the last version in which these updates were available."

I had upgraded to Date 5.x 2.8 on my 5.x site before upgrading. Looking at the install file for that version, it includes updates up to and including 5210, so it appears that for some reason either the 52xx updates were not run during the update to 5.x 2.8, or else they were run but the schema number was not properly updated to reflect this.

I copied updates 5100 through 5210 from the 6.x 2.4 date.install file and added them to the 6.x 2.6 date.install file. I also changed the following line:

function date_update_last_removed() {
  return 5210;
}

to

function date_update_last_removed() {
  return 7;
}

as in the 2.4 date.install file.

This fixed the problem, and I was able to upgrade.

Status:Needs review» Closed (works as designed)

You cannot upgrade from an old version of date to the current version. The expectation is that you got all your modules current in D5 before you updated to D6 (those were the instructions for updating CCK from D5 to D6). If you didn't do that, you'll run into this issue.

It is not a bug, it is expected behavior. Trying to create an update that will work successfully and error free from any possible old versions of the code to the current code is just too hard to do and is too much work to maintain. CCK has the same issue, which is why these instructions were in place.

In my case, I did upgrade to the latest d5 version before migrating to d6. However as stated in my post at #9, for some reason it seems that either some of the upgrade scripts were not run (yes, I ran update.php after upgrading the module code) or else they were run but the latest schema indicator stored in the database was not updated. In any event, I solved the problem as described in #9, should anybody else run into the same issue.

StatusFileSize
new30.92 KB

Here's a copy of the modified date.install file I describe in comment #9 in case it's helpful for someone with the exact same problem I had. This is a substitute for the date.install file that ships with version 2.6. To use it, make sure you have the 2.6 version installed in your modules directory, delete the old date.install file, replace it with this one (you must rename it from date.txt to date.install), then run update.php. Backup your database before using this! If you don't have the same error message I mention in #9, and perform an update with this file, you risk corrupting your database.

It sounds like I had the same problem as you only I'm going from D5 2.8 to D6 2.7

Any more info you can give to help me get through this (seems to be happening on both Calendar and Date modules.

Messages I'm getting:

calendar module can not be updated. Its schema version is 5000. Updates up to and including 5200 have been removed in this release. In order to update calendar module, you will first need to upgrade to the last version in which these updates were available.

date module can not be updated. Its schema version is 5104. Updates up to and including 5210 have been removed in this release. In order to update date module, you will first need to upgrade to the last version in which these updates were available.

date_api module can not be updated. Its schema version is 0. Updates up to and including 5201 have been removed in this release. In order to update date_api module, you will first need to upgrade to the last version in which these updates were available.

Can anyone offer some assistance?

Got stuck when upgrading from D5 2.8 to D6 2.7. The date_* were not created and I couldn't continue (php 5.3.2). #3 was my solution: thanks much dsanchez! I copied the SQL commands to phpmyadmin, added ';' at the end of each command and run them. This allowed me to complete the update. I didn't have to tamper with the system tables. All my date cck fields became active.

Sorry KarenS, just wanted to let you know I updated the latest stable versions, which are Date 5.x-2.8, Views 1.12, and Calendar 5.x-1.7 prior to my D6 upgrade. I still got this error.

So how [per post #10] do I

"get all my modules current in D5 before updating to D6 (those were the instructions for updating CCK from D5 to D6)"

Do I go back and get the last V5 version of the module and install that on my system before trying to get to D6?

I can't install a V6 Version of a module on a V5 version of drupal can I?

So how [per post #10] do I

"get all my modules current in D5 before updating to D6 (those were the instructions for updating CCK from D5 to D6)"

Do I go back and get the last V5 version of the module and install that on my system before trying to get to D6?

I can't install a V6 Version of a module on a V5 version of drupal can I?

You really can't.

Karen has put a lot of work into this module, and I have some sympathy. But I've seen so many problem with this issue that I think it's irresponsible to tell people to do this. At a minimum, there needs to be a procedure to fix this.

I've actually tried to run all of the updaters required from D5 to D7.

The maintainer is simply wrong about this. And by removing the old updater code from _both_ D6 and D7, it is a very, very hard issue to fix.

I'm not sure if it's safe to completely uninstall date and put it back, particular if a site used Date CCK widgets. But this issue screw up the updater system so badly that I'm not sure what else to do besides that.

I respect the work that was put into this module. But this is an issue that burns a lot of users and a lot of developers, and it deserves a more serious response.