campai-bv / autotask-dashboards-os

Dashboards for Autotask - Slick ticket performance dashboard to provide your teams with an at-a-glance status overview.
http://autotask.campai.nl
11 stars 6 forks source link

Database error viewing dashboard: Field 'type' doesn't have a default value #59

Open stephenfourie opened 10 years ago

stephenfourie commented 10 years ago

I created a new dashboard, selecting a few queues, various ticket statuses and a few of the widgets. I click save, it tells me its saved successfully. If I then click the link to view the dashboard, it breaks, with the below error:

database_error_1

See my settings for the dashboard:

database_error

Database Error Error: SQLSTATE[HY000]: General error: 1364 Field 'type' doesn't have a default value

SQL Query: INSERT INTO mycakedb436.dashboardwidgets (dashboard_id, widget_id, ticketstatus_id, display_name, modified, created) VALUES (1, 7, 16, 'Customer Has Responded', '2014-03-13 08:56:24', '2014-03-13 08:56:24')

Notice: If you want to customize this error message, create app\View\Errors\pdo_error.ctp

Stack Trace •CORE\Cake\Model\Datasource\DboSource.php line 458 → PDOStatement->execute(array) •CORE\Cake\Model\Datasource\DboSource.php line 424 → DboSource->_execute(string, array) •CORE\Cake\Model\Datasource\DboSource.php line 1004 → DboSource->execute(string) •CORE\Cake\Model\Model.php line 1832 → DboSource->create(Dashboardwidget, array, array) •APP\Plugin\Autotask\Model\Dashboard.php line 599 → Model->save(array) •APP\Plugin\Autotask\Model\Dashboard.php line 494 → Dashboard->__updateTicketstatuses(array, array) •APP\Plugin\Autotask\Controller\DashboardsController.php line 101 → Dashboard->createDashboardWidgets(array) •[internal function] → DashboardsController->display(string) •CORE\Cake\Controller\Controller.php line 490 → ReflectionMethod->invokeArgs(DashboardsController, array) •CORE\Cake\Routing\Dispatcher.php line 185 → Controller->invokeAction(CakeRequest) •CORE\Cake\Routing\Dispatcher.php line 160 → Dispatcher->_invoke(DashboardsController, CakeRequest, CakeResponse) •APP\webroot\index.php line 108 → Dispatcher->dispatch(CakeRequest, CakeResponse) •ROOT\index.php line 41 → require(string)

coencoppens commented 10 years ago

Are you running the latest Virtual Machine with 1.5.1 or did you install it yourself?

I've tried editing an existing dash but I can't seem to break it.

Update: yay! I managed to break it ;-) Creating a fix, it will require you to run a mysql query.