Configuration:
System: iMac (27-inch, Mid 2010)
Processor: 2.93 GHz Intel Core i7
Memory: 20 GB 1333 MHz DDR3
OS: OS X Yosemite, Version 10.10.1
MYSQL: 5.7.4-m14 MySQL Community Server (GPL)
MYSQLI: mysqlnd 5.0.11-dev - 20120503
Server/PHP: Apache/2.4.9 (Unix) PHP/5.5.14
Two errors during installation:
First Error during 'install site / database configuration':
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: http://localhost/irates8/core/install.php?langcode=en&profile=standard&i...
StatusText: OK
ResponseText: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: CREATE TABLE {block_content_revision} (
`id` INT unsigned NOT NULL COMMENT 'The custom block ID.',
`revision_id` INT unsigned NULL auto_increment DEFAULT NULL COMMENT 'The revision ID.',
`langcode` VARCHAR(12) NOT NULL COMMENT 'The custom block language code.',
`revision_log` LONGTEXT DEFAULT NULL COMMENT 'The log entry explaining the changes in this revision.',
PRIMARY KEY (`revision_id`),
INDEX `block_content__id` (`id`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'The revision table for block_content entities.'; Array
(
)
in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->onEntityTypeCreate() (line 218 of /volumes/iMac_hd10.9/users/paolo/Sites/irates8/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
Continuing after First Error, Second Error:
( ! ) Fatal error: Class 'Drupal\contact\Entity\ContactForm' not found in /volumes/iMac_hd10.9/users/paolo/Sites/irates8/core/profiles/standard/standard.profile on line 26
Call Stack
# Time Memory Function Location
1 0.0009 251608 {main}( ) ../install.php:0
2 0.0057 941104 install_drupal( ) ../install.php:32
3 0.8460 19626184 install_run_tasks( ) ../install.core.inc:102
4 0.8498 19705056 install_run_task( ) ../install.core.inc:488
5 0.8498 19705240 install_get_form( ) ../install.core.inc:526
6 0.8677 21088664 Drupal\Core\Form\FormBuilder->buildForm( ) ../install.core.inc:824
7 0.9305 23107952 Drupal\Core\Form\FormBuilder->processForm( ) ../FormBuilder.php:248
8 1.0221 26829728 Drupal\Core\Form\FormSubmitter->doSubmitForm( ) ../FormBuilder.php:482
9 1.0221 26829840 Drupal\Core\Form\FormSubmitter->executeSubmitHandlers( ) ../FormSubmitter.php:56
10 2.5256 34295360 call_user_func_array ( ) ../FormSubmitter.php:116
11 2.5256 34298816 standard_form_install_configure_submit( ) ../FormSubmitter.php:116
Comments
Comment #1
marcingy commentedI can't recreate on fresh install of the dev version of drupal. Please provide more information
Comment #2
rasmus commentedI hit this too. This is a breaking change in MySQL-5.7. See:
http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-3.html
Scroll way down to where it says:
Columns in a PRIMARY KEY must be NOT NULL, but if declared explicitly as NULL produced no error. Now an error occurs. For example, a statement such as CREATE TABLE t (i INT NULL PRIMARY KEY) is rejected. The same occurs for similar ALTER TABLE statements. (Bug #13995622, Bug #66987, Bug #15967545, Bug #16545198)
But ignoring that and just looking at that schema:
`revision_id` INT unsigned NULL auto_increment DEFAULT NULL COMMENT 'The revision ID.'
That doesn't make sense. Why would you allow NULL for an auto_increment field and default it to NULL at all?
It should be NOT NULL DEFAULT 0 and then it would work with MySQL-5.7 as well.
Comment #3
luketarplin commentedI was getting the Class 'Drupal\contact\Entity\ContactForm' not found issue when attempting a fresh install of the Standard installation profile. Looks like the 'Drupal\contact\Entity\ContactForm' namespace is not autoloading correctly. This only happened when selecting standard due to the call to ContactForm in 'core/profiles/standard/standard.profile'. My setup is as follows
mysql = 5.5.41
php-fpm = 5.6.6
- localhost:9000
./configure --enable-fpm --with-fpm-user=vagrant --enable-opcache --with-mysqli --with-pdo-mysql --with-gd --enable-mbstring --with-openssl --with-libdir=/usr/lib/x86_64-linux-gnu
nginx = 1.1.19
Comment #4
berdirI guess it is more likely that the installation is aborted due to an earlier error, which results in contact.module not being installed properly.
Check the watchdog table/dblog output if possible and watch for earlier errors.
There are other reports about block_content having installation errors but so far, nobody was able to reproduce or figure out why and when that happens.
Comment #5
mgiffordI just got this on a VDD instance:
( ! ) Fatal error: Class 'Drupal\contact\Entity\ContactForm' not found in /var/www/drupal8/core/profiles/standard/standard.profile on line 26
I can't install from the latest git repo.
Call Stack
# Time Memory Function Location
1 0.0002 132412 {main}( ) ../install.php:0
2 0.0132 249480 install_drupal( ) ../install.php:32
3 2.2672 4141872 install_run_tasks( ) ../install.core.inc:117
4 2.2754 4161472 install_run_task( ) ../install.core.inc:517
5 2.2754 4161472 install_get_form( ) ../install.core.inc:560
6 2.3448 4422760 Drupal\Core\Form\FormBuilder->buildForm( ) ../install.core.inc:861
7 2.4546 5387536 Drupal\Core\Form\FormBuilder->processForm( ) ../FormBuilder.php:247
8 2.8226 6285304 Drupal\Core\Form\FormSubmitter->doSubmitForm( ) ../FormBuilder.php:481
9 2.8226 6285408 Drupal\Core\Form\FormSubmitter->executeSubmitHandlers( ) ../FormSubmitter.php:56
10 3.1974 7143932 call_user_func_array:{/var/www/drupal8/core/lib/Drupal/Core/Form/FormSubmitter.php:116} ( ) ../FormSubmitter.php:116
11 3.1974 7145532 standard_form_install_configure_submit( ) ../FormSubmitter.php:116
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP Fatal error: Class 'Drupal\\contact\\Entity\\ContactForm' not found in /var/www/drupal8/core/profiles/standard/standard.profile on line 26, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP Stack trace:, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 1. {main}() /var/www/drupal8/core/install.php:0, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 2. install_drupal() /var/www/drupal8/core/install.php:32, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 3. install_run_tasks() /var/www/drupal8/core/includes/install.core.inc:117, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 4. install_run_task() /var/www/drupal8/core/includes/install.core.inc:517, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 5. install_get_form() /var/www/drupal8/core/includes/install.core.inc:560, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 6. Drupal\\Core\\Form\\FormBuilder->buildForm() /var/www/drupal8/core/includes/install.core.inc:861, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 7. Drupal\\Core\\Form\\FormBuilder->processForm() /var/www/drupal8/core/lib/Drupal/Core/Form/FormBuilder.php:247, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 8. Drupal\\Core\\Form\\FormSubmitter->doSubmitForm() /var/www/drupal8/core/lib/Drupal/Core/Form/FormBuilder.php:481, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 9. Drupal\\Core\\Form\\FormSubmitter->executeSubmitHandlers() /var/www/drupal8/core/lib/Drupal/Core/Form/FormSubmitter.php:56, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 10. call_user_func_array:{/var/www/drupal8/core/lib/Drupal/Core/Form/FormSubmitter.php:116}() /var/www/drupal8/core/lib/Drupal/Core/Form/FormSubmitter.php:116, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
[Mon Mar 09 18:51:55 2015] [error] [client 192.168.44.1] PHP 11. standard_form_install_configure_submit() /var/www/drupal8/core/lib/Drupal/Core/Form/FormSubmitter.php:116, referer: http://drupal8.dev/core/install.php?langcode=en&profile=standard
Comment #6
luketarplin commentedMike I shouldn't say this but I just comment out line 26 from core/profile/standard/standard.profile that is: //ContactForm::load('feedback')->setRecipients([$site_mail])->save(); and it works Ok then... not a solution I grant you but at least it allows me to progress further.
Comment #7
vijaycs85Just got the error mentioned in #5 in http://simplytest.me/. By the way, we should split this issue. One for MySQL error, if it is still there and another one for the contact form fatal.
Comment #8
johnvThis error appears when trying to install D8beta15 on DevDesktop with PHP 5.5:
Fatal error: Class 'Drupal\contact\Entity\ContactForm' not found in ...\core\profiles\standard\standard.profile on line 26The database does not contains a watchdog table, as Berdir proposed. The last table (alphabetically ordered) is user__roles.
Comment #9
catchComment #10
catchComment #11
mikeryanThe ContactForm error should be opened as a separate issue.
Looking at the SQL error relative to #2616488: [meta] MySQL 5.7 / MariaDb 10.1.* support, I've stepped through the table creation code for block_content_revision and the SQL ends up as
I.e., revision_id is properly defined as NOT NULL.
So, either
On the latter point I was doing
Can anyone on MySQL 5.7.x (x >= 3) try installing D8 with block_content and see if it's reproducible?
Comment #12
mikeryanFollow up with the ContactForm error at #2616710: ContactForm error on installation.
Comment #13
catchMarking needs more info. I'd expect this to affect all revisionable entities, not just blocks if it was a core bug.
Comment #14
alexpottI think this has been fixed. We changed the NULL logic in entity storage on some issue I cannot recall off the top of my head. Grepping the git log and using git blame... I think it might have been #2232477: Fatal when adding new fields with NOT NULL constraints in a base table that contains existing entities.
Comment #15
alexpottYep I've confirmed it was #2232477: Fatal when adding new fields with NOT NULL constraints in a base table that contains existing entities that fixed this... Drupal installs fine using MySQL 5.7.9 when head is at
057b0cabafde660cea2396b460ba4380c3a40d9cbut fails when HEAD is on the previous commit with the error reported in this issue.Comment #16
alexpottMy MySQL version is 10.7.9
Comment #18
robladdish commentedStill seems to be an issue - found this with a fresh install, mysql 5.7, php 5.6, Apache 2.4, Windows7 + panapoly distribution.
Comment #19
ddarras2012 commentedFWIW I found that rolling back to MySQL 5.5 instead of 5.7 on DrupalVM seemed to solve the issue by changing the config.yml setting to "vagrant_box: geerlingguy/ubuntu1204". Rolling back to an older version of MySQL is extreme, given that the query is supposed to fail on newer ones, but that was my only choice.