-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Invalid default value for 'tstamp' #78
Comments
You're not getting 404 because of this error. It's a known issue. Unfortunately CoolUri relies on the timestamp, so it's not easy to fix in. |
@bednee It was because of that. Because the tables 'link_cache' and 'link_oldlinks' were missing because of that error and thats why I couldn't even have a link cache. I have seen, that you have in the ext_tables.sql the following:
And |
I think TYPO3 is doing it. It doesn't support TIMESTAMP naturally so it probably tries to remap it to DATETIME. |
Ah yes, that's possible. But is the |
Well, it's needed at the moment. I believe it's possible to remove it, but I don't have capacity for it at the moment. I'll keep this issue open and hopefully I'll find some time to work on it (or approve merge request ;) ) |
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.
The text was updated successfully, but these errors were encountered: