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

Datasets - changing column data types and then data in the column causes unexpected error #1184

Closed
PeterMis opened this issue May 12, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@PeterMis
Copy link
Member

PeterMis commented May 12, 2017

Scenario:
We create a new dataSet and add new column with Number data type,
*We add a data to the column for example 9
We change the column data type from Number to String
We try to add a string data (that would be invalid for Number data type) for example 9:00 and click Save.

*Not necessary

We will get unexpected error

/dataset/data/54/1 SQLSTATE[01000]: Warning: 1265 Data truncated for column 'col5' at row 1 Exception Type: PDOException

/dataset/data/54/1 SQLSTATE[01000]: Warning: 1265 Data truncated for column 'col5' at row 1#0 /var/www/cms/lib/Storage/PdoStorageService.php(206): PDOStatement->execute(Array) #1 /var/www/cms/lib/Entity/DataSet.php(659): Xibo\Storage\PdoStorageService->update('UPDATE `dataset...', Array) #2 /var/www/cms/lib/Controller/DataSetData.php(362): Xibo\Entity\DataSet->editRow('1', Array) #3 [internal function]: Xibo\Controller\DataSetData->edit('54', '1') #4 /var/www/cms/vendor/akrabat/rka-slim-controller/RKA/Slim.php(79): call_user_func_array(Array, Array) #5 [internal function]: RKA\Slim->RKA\{closure}('54', '1') #6 /var/www/cms/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array) #7 /var/www/cms/vendor/slim/slim/Slim/Slim.php(1357): Slim\Route->dispatch() #8 /var/www/cms/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #9 /var/www/cms/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #10 /var/www/cms/lib/Middleware/Actions.php(141): Slim\Middleware\MethodOverride->call() #11 /var/www/cms/lib/Middleware/Theme.php(35): Xibo\Middleware\Actions->call() #12 /var/www/cms/lib/Middleware/WebAuthentication.php(132): Xibo\Middleware\Theme->call() #13 /var/www/cms/lib/Middleware/CsrfGuard.php(62): Xibo\Middleware\WebAuthentication->call() #14 /var/www/cms/lib/Middleware/State.php(109): Xibo\Middleware\CsrfGuard->call() #15 /var/www/cms/lib/Middleware/Storage.php(47): Xibo\Middleware\State->call() #16 /var/www/cms/lib/Middleware/Xmr.php(36): Xibo\Middleware\Storage->call() #17 /var/www/cms/vendor/slim/slim/Slim/Slim.php(1302): Xibo\Middleware\Xmr->call() #18 /var/www/cms/web/index.php(124): Slim\Slim->run() #19 {main}

It would seem as the data type change is not correctly saved and then causing issues if we try to enter data with different type than the original column type.

@PeterMis PeterMis added the bug label May 12, 2017
@PeterMis PeterMis added this to the 1.8.2 milestone May 12, 2017
@dasgarner dasgarner self-assigned this Jun 5, 2017
dasgarner added a commit to dasgarner/xibo-cms that referenced this issue Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants