campsych / concerto-platform

Concerto Platform - Open-Source Online Adaptive Testing Platform
https://concertoplatform.com/
Apache License 2.0
153 stars 88 forks source link

System error when adding column to a user data table #331

Open mkrasmus opened 3 years ago

mkrasmus commented 3 years ago

Concerto Platform version

v5.0.22 (locally hosted Docker container as per quick start guide)

Expected behavior

I expected to see an additional column created in my user made data table structure.

Actual behavior

System errors Operation failed. Validate your data and try again.

On inspection of the F12 -> console there is an error

POST http://localhost/admin/DataTable/17/column/0/save 500 (Internal Server Error) (anonymous) @ angular.js:13692 s @ angular.js:13418 (anonymous) @ angular.js:13159 (anonymous) @ angular.js:18075 $digest @ angular.js:19242 $apply @ angular.js:19630 (anonymous) @ angular.js:29127 dispatch @ jquery.min.js?v=5.0.22:2 v.handle @ jquery.min.js?v=5.0.22:2

Docker log MySQL

Version: '5.7.33' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)

2021-04-14T13:18:46.693554Z 2 [Note] Got an error reading communication packets

2021-04-14T13:25:13.161673Z 55 [Warning] InnoDB: Table concerto/mochacattest1 contains 12 user defined columns in InnoDB, but 11 columns in MySQL. Please check INFORMATION_SCHEMA.INNODB_SYS_COLUMNS and http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.

2021-04-14T13:25:13.161708Z 55 [Warning] InnoDB: Cannot open table concerto/mochacattest1 from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.

Docker log Concerto

wait-for-it.sh: waiting 300 seconds for database:3306

wait-for-it.sh: database:3306 is available after 2 seconds

concerto setup (prod)

updating database...

[OK] Nothing to update - your database is already in sync with the current

entity metadata.

database up to date

checking for user roles...

ROLE_TEST found

ROLE_TABLE found

ROLE_TEMPLATE found

ROLE_WIZARD found

ROLE_FILE found

ROLE_SUPER_ADMIN found

checking for default user...

default user found

copying files...

files copied successfully

importing content...

source path used:

.

instructions used:

[]

importing export.concerto.yml...

imported export.concerto.yml successfully

// Warming up the cache for the prod environment with debug

// false

[OK] Cache for the "prod" environment (debug=false) was successfully warmed.

...done.

Wed Apr 14 14:01:23 BST 2021: forker process not running

starting forker...

forker started

==> var/logs/prod.log <==

==> var/logs/forker.log <==

Loading required package: concerto5

Loading required package: session

Loading required package: jsonlite

Loading required package: parallel

Loading required package: RMySQL

Loading required package: DBI

[1] "starting forker listener"

==> var/logs/prod.log <==

{"@timestamp":"2021-04-14T14:02:52.385205+01:00","@source":"9a71989770f2","@fields":{"channel":"request","level":200,"ctxt_route":"DataTable_column_save","ctxt_route_parameters":{"_controller":"Concerto\PanelBundle\Controller\DataTableController::saveColumnAction","table_id":"17","column_name":"0","_route":"DataTable_column_save"},"ctxt_request_uri":"http://localhost/admin/DataTable/17/column/0/save","ctxt_method":"POST"},"@message":"Matched route \"DataTable_column_save\".","@tags":["request"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:02:52.388208+01:00","@source":"9a71989770f2","@fields":{"channel":"security","level":100,"ctxt_key":"_security_admin_area","ctxt_token_class":"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken"},"@message":"Read existing security token from the session.","@tags":["security"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:02:52.390184+01:00","@source":"9a71989770f2","@fields":{"channel":"security","level":100,"ctxt_provider":"Symfony\Bridge\Doctrine\Security\User\EntityUserProvider","ctxt_username":"admin"},"@message":"User was reloaded from a user provider.","@tags":["security"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:02:52.443696+01:00","@source":"9a71989770f2","@fields":{"channel":"request","level":500,"ctxt_exception":{"class":"Doctrine\DBAL\Exception\TableNotFoundException","message":"An exception occurred while executing 'ALTER TABLE MochaCATtest1 ADD responseScore1 TINYINT(1) DEFAULT NULL':\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'concerto.mochacattest1' doesn't exist","code":0,"file":"/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:46","trace":["/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:172","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:151","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1087","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:1044","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:607","/app/concerto/src/Concerto/PanelBundle/DAO/DBStructureDAO.php:139","/app/concerto/src/Concerto/PanelBundle/Service/DBStructureService.php:109","/app/concerto/src/Concerto/PanelBundle/Service/DataTableService.php:311","/app/concerto/src/Concerto/PanelBundle/Controller/DataTableController.php:340","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200","/app/concerto/web/app.php:24"],"previous":{"class":"Doctrine\DBAL\Driver\PDOException","message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'concerto.mochacattest1' doesn't exist","code":42,"file":"/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:46","trace":["/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1080","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:1044","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:607","/app/concerto/src/Concerto/PanelBundle/DAO/DBStructureDAO.php:139","/app/concerto/src/Concerto/PanelBundle/Service/DBStructureService.php:109","/app/concerto/src/Concerto/PanelBundle/Service/DataTableService.php:311","/app/concerto/src/Concerto/PanelBundle/Controller/DataTableController.php:340","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200","/app/concerto/web/app.php:24"],"previous":{"class":"PDOException","message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'concerto.mochacattest1' doesn't exist","code":42,"file":"/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:41","trace":["/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:41","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1080","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:1044","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:607","/app/concerto/src/Concerto/PanelBundle/DAO/DBStructureDAO.php:139","/app/concerto/src/Concerto/PanelBundle/Service/DBStructureService.php:109","/app/concerto/src/Concerto/PanelBundle/Service/DataTableService.php:311","/app/concerto/src/Concerto/PanelBundle/Controller/DataTableController.php:340","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200","/app/concerto/web/app.php:24"]}}}},"@message":"Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException: \"An exception occurred while executing 'ALTER TABLE MochaCATtest1 ADD responseScore1 TINYINT(1) DEFAULT NULL':\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'concerto.mochacattest1' doesn't exist\" at /app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 46","@tags":["request"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:02:52.447851+01:00","@source":"9a71989770f2","@fields":{"channel":"security","level":100,"ctxt_key":"_security_admin_area"},"@message":"Stored the security token in the session.","@tags":["security"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:05:07.920626+01:00","@source":"9a71989770f2","@fields":{"channel":"request","level":400,"ctxt_exception":{"class":"Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException","message":"No route found for \"GET /admin/DataTable/17/column/0/save\": Method Not Allowed (Allow: POST)","code":0,"file":"/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:141","trace":["/app/concerto/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:214","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44","/app/concerto/vendor/symfony/symfony/src

/Symfony/Component/HttpKernel/HttpKernel.php:127","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200","/app/concerto/web/app.php:24"],"previous":{"class":"Symfony\Component\Routing\Exception\MethodNotAllowedException","message":"","code":0,"file":"/app/concerto/var/cache/prod/appProdProjectContainerUrlMatcher.php:1917","trace":["/app/concerto/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php:93","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:262","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:113","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:214","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:127","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200","/app/concerto/web/app.php:24"]}}},"@message":"Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: \"No route found for \"GET /admin/DataTable/17/column/0/save\": Method Not Allowed (Allow: POST)\" at /app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 141","@tags":["request"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:05:45.503687+01:00","@source":"9a71989770f2","@fields":{"channel":"request","level":200,"ctxt_route":"DataTable_column_save","ctxt_route_parameters":{"_controller":"Concerto\PanelBundle\Controller\DataTableController::saveColumnAction","table_id":"17","column_name":"0","_route":"DataTable_column_save"},"ctxt_request_uri":"http://localhost/admin/DataTable/17/column/0/save","ctxt_method":"POST"},"@message":"Matched route \"DataTable_column_save\".","@tags":["request"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:05:45.506239+01:00","@source":"9a71989770f2","@fields":{"channel":"security","level":100,"ctxt_key":"_security_admin_area","ctxt_token_class":"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken"},"@message":"Read existing security token from the session.","@tags":["security"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:05:45.507856+01:00","@source":"9a71989770f2","@fields":{"channel":"security","level":100,"ctxt_provider":"Symfony\Bridge\Doctrine\Security\User\EntityUserProvider","ctxt_username":"admin"},"@message":"User was reloaded from a user provider.","@tags":["security"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:05:45.523815+01:00","@source":"9a71989770f2","@fields":{"channel":"request","level":500,"ctxt_exception":{"class":"Doctrine\DBAL\Exception\TableNotFoundException","message":"An exception occurred while executing 'ALTER TABLE MochaCATtest1 ADD responseLabel2 LONGTEXT DEFAULT NULL':\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'concerto.mochacattest1' doesn't exist","code":0,"file":"/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:46","trace":["/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:172","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:151","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1087","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:1044","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:607","/app/concerto/src/Concerto/PanelBundle/DAO/DBStructureDAO.php:139","/app/concerto/src/Concerto/PanelBundle/Service/DBStructureService.php:109","/app/concerto/src/Concerto/PanelBundle/Service/DataTableService.php:311","/app/concerto/src/Concerto/PanelBundle/Controller/DataTableController.php:340","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200","/app/concerto/web/app.php:24"],"previous":{"class":"Doctrine\DBAL\Driver\PDOException","message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'concerto.mochacattest1' doesn't exist","code":42,"file":"/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:46","trace":["/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1080","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:1044","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:607","/app/concerto/src/Concerto/PanelBundle/DAO/DBStructureDAO.php:139","/app/concerto/src/Concerto/PanelBundle/Service/DBStructureService.php:109","/app/concerto/src/Concerto/PanelBundle/Service/DataTableService.php:311","/app/concerto/src/Concerto/PanelBundle/Controller/DataTableController.php:340","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200","/app/concerto/web/app.php:24"],"previous":{"class":"PDOException","message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'concerto.mochacattest1' doesn't exist","code":42,"file":"/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:41","trace":["/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:41","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1080","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:1044","/app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:607","/app/concerto/src/Concerto/PanelBundle/DAO/DBStructureDAO.php:139","/app/concerto/src/Concerto/PanelBundle/Service/DBStructureService.php:109","/app/concerto/src/Concerto/PanelBundle/Service/DataTableService.php:311","/app/concerto/src/Concerto/PanelBundle/Controller/DataTableController.php:340","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68","/app/concerto/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200","/app/concerto/web/app.php:24"]}}}},"@message":"Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException: \"An exception occurred while executing 'ALTER TABLE MochaCATtest1 ADD responseLabel2 LONGTEXT DEFAULT NULL':\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'concerto.mochacattest1' doesn't exist\" at /app/concerto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 46","@tags":["request"],"@type":"concerto"}

{"@timestamp":"2021-04-14T14:05:45.525063+01:00","@source":"9a71989770f2","@fields":{"channel":"security","level":100,"ctxt_key":"_security_admin_area"},"@message":"Stored the security token in the session.","@tags":["security"],"@type":"concerto"}

Steps to reproduce the issue

I attempted to add a second column to a data table structure.

Restarting Docker and returning to Concerto Platform shows that the additional column was included in the data table structure. However, if attempts are made to continue creating additional columns despite the errors above, only the first additional column is saved.