Skip to content
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

Install error in MODX 3.x #19

Open
smg6511 opened this issue Dec 1, 2021 · 2 comments
Open

Install error in MODX 3.x #19

smg6511 opened this issue Dec 1, 2021 · 2 comments

Comments

@smg6511
Copy link
Contributor

smg6511 commented Dec 1, 2021

The installer partially fails and is unable to create the forms table because the default value for the published_from and published_till is invalid. The following is what is shown in the console:

Could not create table `formalicious_forms` SQL: 
CREATE TABLE `formalicious_forms` (
	`id` INT ( 11 ) NOT NULL AUTO_INCREMENT,
	`category_id` INT ( 10 ) NOT NULL DEFAULT '0',
	`name` VARCHAR ( 255 ) NOT NULL DEFAULT '',
	`published` TINYINT ( 1 ) NOT NULL DEFAULT '0',
	`published_from` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
	`published_till` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
	`saveform` TINYINT ( 1 ) UNSIGNED NOT NULL DEFAULT '0',
	`redirectto` INT ( 10 ) UNSIGNED NOT NULL DEFAULT '0',
	`email` TINYINT ( 1 ) UNSIGNED NOT NULL DEFAULT '0',
	`emailto` TEXT NOT NULL,
	`emailsubject` VARCHAR ( 255 ) NOT NULL DEFAULT '',
	`emailcontent` TEXT NOT NULL,
	`fiaremail` TINYINT ( 1 ) UNSIGNED NOT NULL DEFAULT '0',
	`fiaremailto` INT ( 11 ) UNSIGNED NOT NULL DEFAULT '0',
	`fiaremailfrom` TEXT NOT NULL,
	`fiaremailsubject` VARCHAR ( 255 ) NOT NULL DEFAULT '',
	`fiaremailcontent` TEXT NOT NULL,
	`fiaremailattachment` TEXT NOT NULL,
	`prehooks` VARCHAR ( 255 ) NOT NULL DEFAULT '',
	`posthooks` VARCHAR ( 255 ) NOT NULL DEFAULT '',
	`parameters` TEXT NOT NULL,
	PRIMARY KEY ( `id` ),
	INDEX `category_id` ( `category_id` ),
	INDEX `saveform` ( `saveform` ),
INDEX `email` ( `email` ),
INDEX `fiaremail` ( `fiaremail` )) ENGINE = MyISAM

ERROR: Array ( [0] => 42000 [1] => 1067 [2] => Invalid default value for 'published_from' )

Could not load class: modTransportPackage from mysql.modtransportpackage

Could not get table name for class:
Error 42000 executing statement: Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS `latestPackage` WHERE `latestPackage`.`package_name` = `modTransp' at line 3 )
@patrickatwsrn
Copy link

"Could not create table formalicious_forms..." seems to be fixed, at least the error doesn't show up in modx3.0.0-beta / formalicious2.0.5pl

See: #21

Happy new year

@muzzwood
Copy link

muzzwood commented Dec 9, 2023

Unfortunately it looks like this is still an issue.

I just got the same "Could not create table formalicious_forms" error when installing Formalicious 3.0.0
MODX 3.0.4
PHP 8.1

I think this is most likely to do with the NO_ZERO_DATE mysql mode: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_no_zero_date

The schema line in question:

<field key="published_from" dbtype="timestamp" precision="1" phptype="timestamp" null="false" default="0000-00-00 00:00:00" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants