I have been pulling my hair out on this one. I am getting this error:
Exception Occurred: /homepages/22/d734597661/htdocs/clickandbuilds/concrete/MyCMS/updates/concrete5-8.4.2/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:112 An exception occurred while executing 'insert into Pages (cID, siteTreeID, ptID, cParentID, uID, cInheritPermissionsFrom, cOverrideTemplatePermissions, cInheritPermissionsFromCID, cDisplayOrder, pkgID, cIsActive, cIsDraft) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["461", null, "12", null, "1", "TEMPLATE", null, 210, 0, 0, 0, 1]:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'cOverrideTemplatePermissions' cannot be null (0)
Here is the code:
case '2005':
return new Exception\ConnectionException($message, $exception);
case '1048':
case '1121':
case '1138':
case '1171':
case '1252':
case '1263':
case '1566':
return new Exception\NotNullConstraintViolationException($message, $exception);
}
return new Exception\DriverException($message, $exception);
}
/**
* {@inheritdoc}
*/
public function createDatabasePlatformForVersion($version)
{
if ( ! preg_match('/^(?P<major>\d+)(?:\.(?P<minor>\d+)(?:\.(?P<patch>\d+))?)?/', $version, $versionParts)) {
This is breaking my web site. I would be very grateful if anyone has seen this before and could tell me what to do. I am lost. I understand it's a mysql error. The error is generated from this line:
return new Exception\NotNullConstraintViolationException($message, $exception);
This is a core issue in Concrete5, and nothing you should be looking to fix manually.
Your best option for solving this is discussing with the Concrete5 developers on their Slack channel or opening a bug report on their github repo.
If you are able to fix this on your own in the referenced file, the next time you update Concrete5 it will just break again.
Concrete5 does allow overrides of most files, but with issues like this that are core functionality it's usually best to rely on the Concrete5 team to fix the issue and push out an update.
All that said, it might be possible to troubleshoot more, but you have to share what you're doing when this error occurs:
Finally, the first thing I always do in Concrete5 is clear the cache
. If that doesn't work you can always try recreating the page causing the issue, since some older bugs in Concrete5 can persist through database consistency issues after upgrading to newer versions.