Express Object Attribute Delete

Permalink 2 2 Browser Info Environment
```
Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException thrown with message "An exception occurred while executing 'DELETE FROM AttributeKeys WHERE akID = ?' with params [47]:

SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`sbsamwo_conc`.`atExpressSelectedEntries`, CONSTRAINT `FK_C9D404BBA2A82A5D` FOREIGN KEY (`avID`) REFERENCES `atExpress` (`avID`))"

Stacktrace:
#34 Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:60
#33 Doctrine\DBAL\Driver\AbstractMySQLDriver:convertException in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:128
#32 Doctrine\DBAL\DBALException:driverExceptionDuringQuery in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1015
#31 Doctrine\DBAL\Driver\PDOException in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107
#30 PDOException in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
#29 PDOStatement:execute in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
#28 Doctrine\DBAL\Driver\PDOStatement:execute in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1008
#27 Doctrine\DBAL\Connection:executeUpdate in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:597
#26 Doctrine\DBAL\Connection:delete in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php:285
#25 Doctrine\ORM\Persisters\Entity\JoinedSubclassPersister:delete in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1094
#24 Doctrine\ORM\UnitOfWork:executeDeletions in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:406
#23 Doctrine\ORM\UnitOfWork:commit in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356
#22 Doctrine\ORM\EntityManager:flush in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Page/Controller/DashboardAttributesPageController.php:262
#21 Concrete\Core\Page\Controller\DashboardAttributesPageController:executeDelete in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/controllers/single_page/dashboard/system/express/entities/attributes.php:76
#20 Concrete\Controller\SinglePage\Dashboard\System\Express\Entities\Attributes:delete in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Controller/AbstractController.php:294
#19 call_user_func_array in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Controller/AbstractController.php:294
#18 Concrete\Core\Controller\AbstractController:runAction in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/ResponseFactory.php:188
#17 Concrete\Core\Http\ResponseFactory:controller in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/ResponseFactory.php:362
#16 Concrete\Core\Http\ResponseFactory:collection in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/DefaultDispatcher.php:130
#15 Concrete\Core\Http\DefaultDispatcher:handleDispatch in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/DefaultDispatcher.php:58
#14 Concrete\Core\Http\DefaultDispatcher:dispatch in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/DispatcherDelegate.php:39
#13 Concrete\Core\Http\Middleware\DispatcherDelegate:next in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/ThumbnailMiddleware.php:76
#12 Concrete\Core\Http\Middleware\ThumbnailMiddleware:process in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/MiddlewareDelegate.php:50
#11 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/FrameOptionsMiddleware.php:39
#10 Concrete\Core\Http\Middleware\FrameOptionsMiddleware:process in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/MiddlewareDelegate.php:50
#9 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/CookieMiddleware.php:35
#8 Concrete\Core\Http\Middleware\CookieMiddleware:process in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/MiddlewareDelegate.php:50
#7 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/ApplicationMiddleware.php:29
#6 Concrete\Core\Http\Middleware\ApplicationMiddleware:process in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/MiddlewareDelegate.php:50
#5 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/Middleware/MiddlewareStack.php:86
#4 Concrete\Core\Http\Middleware\MiddlewareStack:process in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Http/DefaultServer.php:85
#3 Concrete\Core\Http\DefaultServer:handleRequest in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Foundation/Runtime/Run/DefaultRunner.php:128
#2 Concrete\Core\Foundation\Runtime\Run\DefaultRunner:run in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/src/Foundation/Runtime/DefaultRuntime.php:102
#1 Concrete\Core\Foundation\Runtime\DefaultRuntime:run in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/concrete/dispatcher.php:45
#0 require in /home/sbsamwo/domains/sbsamwo.h2g.pl/public_html/index.php:3
```

exeption in:
```
/home
/sbsamwo
/domains
/sbsamwo.h2g.pl
/public_html
/concrete
/vendor
/doctrine
/dbal
/lib
/Doctrine
/DBAL
/Driver
/AbstractMySQLDriver.php

*
* @linkhttp://dev.mysql.com/doc/refman/5.7/en/error-messages-client.html...
* @linkhttp://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html...
*/
public function convertException($message, DriverException $exception)
{
switch ($exception->getErrorCode()) {
case '1050':
return new Exception\TableExistsException($message, $exception);

case '1051':
case '1146':
return new Exception\TableNotFoundException($message, $exception);

case '1216':
case '1217':
case '1451':
case '1452':
case '1701':
return new Exception\ForeignKeyConstraintViolationException($message, $exception);

case '1062':
case '1557':
case '1569':
case '1586':
return new Exception\UniqueConstraintViolationException($message, $exception);

case '1054':
case '1166':
case '1611':
return new Exception\InvalidFieldNameException($message, $exception);

case '1052':
case '1060':
```


Status: New
onemhz

concrete5 Environment Information

# concrete5 Version
Core Version - 8.5.2
Version Installed - 8.5.2
Database Version - 20190925072210

# Database Information
Version: 10.1.40-MariaDB-cll-lve
SQL Mode: NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# concrete5 Packages
Cloneamental (0.9.3), Fileset Attribute (1.1), Login Block (0.9.3), Login Dialog (0.9.7), Spacer (1.0.0), Speed Analyzer (1.2.1), Stucco (2.1.6), TRIGONmedia Blocks (0.9.14), TRIGONmedia Default Blocks (1.2.0)

# concrete5 Overrides
blocks/page_title/templates/entry_test.php, blocks/page_title/templates/entry_test_8.4.5.php, blocks/page_title/templates, blocks/page_title, blocks/html/view.php, blocks/html/templates/no-code.php, blocks/html/templates/sbs_ex_grupa-towarowa_footer.php, blocks/html/templates/sbs_ex_struktura.php, blocks/html/templates/sbs_ex_oferta.php, blocks/html/templates/markdown-code.php, blocks/html/templates, blocks/html, blocks/page_list/templates/sbs_news_list.php, blocks/page_list/templates, blocks/page_list, elements/_f.php, elements/_samwo_v1.php, elements/_samwo.php, elements/_parsedown.php, elements/_e.php, elements/_fastimage.php

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Only when manually removed or the cache is cleared.

# Server Software
LiteSpeed

# Server API
litespeed

# PHP Version
5.6.40

# PHP Extensions
bcmath, bz2, bz2_filter, calendar, Core, ctype, curl, date, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, geoip, gettext, gmp, hash, iconv, imagick, imap, intl, ionCube Loader, json, ldap, libevent, libxml, litespeed, mbstring, mcrypt, mhash, mssql, mysql, mysqli, mysqlnd, ncurses, oci8, odbc, openssl, pcntl, pcre, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 180
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - -1
max_input_vars - 10000
memory_limit - 128M
post_max_size - 128M
sql.safe_mode - Off
upload_max_filesize - 128M
ic24.api.max_timeout - 7
ldap.max_links - Unlimited
mssql.max_links - Unlimited
mssql.max_persistent - Unlimited
mssql.max_procs - Unlimited
mssql.textlimit - Server default
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
oci8.max_persistent - -1
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
zend_optimizerplus.max_accelerated_files - 2000
zend_optimizerplus.max_file_size - 0
zend_optimizerplus.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0