Skip to content

Error: Invalid default value for 'tstamp' #78

@mo-mueller

Description

@mo-mueller

I have installed CoolURI on my TYPO3 8.7.7 site. The URLs are changed now, but if I click on a link I'm getting "Page not found". So I have checked the database with the install tool. There are two differences:

CREATE TABLE `link_cache` (`id` INT UNSIGNED AUTO_INCREMENT NOT NULL, `params` BLOB DEFAULT NULL, `url` VARCHAR(255) DEFAULT NULL, `tstamp` DATETIME DEFAULT CURRENT_TIMESTAMP, `crdatetime` DATETIME DEFAULT NULL, `sticky` SMALLINT UNSIGNED DEFAULT 0, INDEX `url` (url(255)), INDEX `params` (params(255)), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB

CREATE TABLE `link_oldlinks` (`id` INT UNSIGNED AUTO_INCREMENT NOT NULL, `link_id` INT UNSIGNED DEFAULT 0 NOT NULL, `url` VARCHAR(255) DEFAULT NULL, `tstamp` DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, `sticky` SMALLINT UNSIGNED DEFAULT 0, UNIQUE INDEX `id` (id), INDEX `url` (url(255)), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB

If I try to execute it, I'm getting Database update failed Error: Invalid default value for 'tstamp'

I have read here, that CURRENT_TIMESTAMP is only acceptable on TIMESTAMP fields and not on DATETIME.

Is that a thing of my TYPO3 Installation or of my server configuration, or why it seems like I'm the first one who have this problem?

EDIT:

I have exuted the above statements now manually on phpmyadmin without the "DEFAULT CURRENT_TIMESTAMP" and now the "Page not found" problem is gone. But nevertheless you should fix that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions