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

Error when updating Component Name #445

Closed
jdl031 opened this issue Feb 3, 2015 · 9 comments
Closed

Error when updating Component Name #445

jdl031 opened this issue Feb 3, 2015 · 9 comments
Labels
Bug Bugs with Cachet Database/Postgres
Milestone

Comments

@jdl031
Copy link

jdl031 commented Feb 3, 2015

I'm attempting to update a component name and get the following error. Note: Only change I made from the last time I updated a component name was that I set up DNS CNAME to point from status.redoxengine.com to redox-status.herokuapp.com

Is this a known issue? Any known workarounds or fixes?

Illuminate\Database\QueryException thrown with message "SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "" (SQL: update "components" set "name" = Redox Core Server, "group_id" = , "updated_at" = 2015-02-03 13:13:40 where "id" = 1)"

Stacktrace:
#32 Illuminate\Database\QueryException in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:625
#31 CachetHQ\Cachet\Http\Controllers\DashComponentController:updateComponentAction in <#unknown>:0
#30 Illuminate\Routing\Router:Illuminate\Routing{closure} in <#unknown>:0
#29 PDOException in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:391
#28 PDOStatement:execute in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:391
#27 Illuminate\Database\Connection:Illuminate\Database{closure} in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:617
#26 Illuminate\Database\Connection:runQueryCallback in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:581
#25 Illuminate\Database\Connection:run in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:394
#24 Illuminate\Database\Connection:affectingStatement in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:339
#23 Illuminate\Database\Connection:update in /app/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:1911
#22 Illuminate\Database\Query\Builder:update in /app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:316
#21 Illuminate\Database\Eloquent\Builder:update in /app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1514
#20 Illuminate\Database\Eloquent\Model:performUpdate in /app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1447
#19 Illuminate\Database\Eloquent\Model:save in /app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1398
#18 Illuminate\Database\Eloquent\Model:update in /app/src/Http/Controllers/DashComponentController.php:109
#17 CachetHQ\Cachet\Http\Controllers\DashComponentController:updateComponentAction in <#unknown>:0
#16 call_user_func_array in /app/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:231
#15 Illuminate\Routing\Controller:callAction in /app/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:93
#14 Illuminate\Routing\ControllerDispatcher:call in /app/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:62
#13 Illuminate\Routing\ControllerDispatcher:dispatch in /app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:962
#12 Illuminate\Routing\Router:Illuminate\Routing{closure} in <#unknown>:0
#11 call_user_func_array in /app/vendor/laravel/framework/src/Illuminate/Routing/Route.php:109
#10 Illuminate\Routing\Route:run in /app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:1028
#9 Illuminate\Routing\Router:dispatchToRoute in /app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:996
#8 Illuminate\Routing\Router:dispatch in /app/vendor/dingo/api/src/Routing/Router.php:220
#7 Dingo\Api\Routing\Router:dispatch in /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:775
#6 Illuminate\Foundation\Application:dispatch in /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:745
#5 Illuminate\Foundation\Application:handle in /app/vendor/laravel/framework/src/Illuminate/Session/Middleware.php:72
#4 Illuminate\Session\Middleware:handle in /app/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php:47
#3 Illuminate\Cookie\Queue:handle in /app/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php:51
#2 Illuminate\Cookie\Guard:handle in /app/vendor/stack/builder/src/Stack/StackedHttpKernel.php:23
#1 Stack\StackedHttpKernel:handle in /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:641
#0 Illuminate\Foundation\Application:run in /app/public/index.php:48

@jdl031
Copy link
Author

jdl031 commented Feb 3, 2015

After a bit more digging, this error is occurring when updating components which are not part of a Component Group. In this scenario, group_id is set to null which is breaking the SQL query.

@jbrooksuk
Copy link
Member

What database driver are you using?

@jbrooksuk jbrooksuk added the Bug Bugs with Cachet label Feb 3, 2015
@jdl031
Copy link
Author

jdl031 commented Feb 3, 2015

Used the automated deploy to Heroku, so it's Postgres.

@jbrooksuk
Copy link
Member

That explains it. I'll take a look :)

@jbrooksuk
Copy link
Member

What's interesting here is that we set a default group_id in the form in a hidden field.

@jbrooksuk
Copy link
Member

Are you using the latest version?

@jbrooksuk jbrooksuk reopened this Feb 6, 2015
@jbrooksuk
Copy link
Member

Never mind, I got confused and happened to be using my development version.

@jbrooksuk
Copy link
Member

You can't actually get to the /dashboard/components/1/edit page.

@jbrooksuk jbrooksuk modified the milestone: First Release (v1.0.0) Feb 6, 2015
@jbrooksuk
Copy link
Member

Must be a migrations thing, because after redeploying the Cachet demo I'm able to edit components completely.

Sorry about this @jdl031 but you may want to manually update your tables for this. This is one of the last migration changes - we have scheduled maintenance and metrics to come yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bugs with Cachet Database/Postgres
Projects
None yet
Development

No branches or pull requests

2 participants