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

Max length of the Custom Field title? #1683

Closed
vabue opened this issue Jan 26, 2016 · 0 comments
Closed

Max length of the Custom Field title? #1683

vabue opened this issue Jan 26, 2016 · 0 comments
Assignees

Comments

@vabue
Copy link

vabue commented Jan 26, 2016

It seems that there are some limitations on the length of a Custom Field title. When I use the name "Тип оплати готівка або безготівка", Snipe-it generates 500 error.

#33 {main} [] []
[2016-01-26 15:01:55] production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1059 Identifier name '_snipeit_______________________________________________________________' is too long' in /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Connection.php:369
Stack trace:
#0 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Connection.php(369): PDO->prepare('ALTER TABLE ass...')
#1 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Connection.php(617): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'ALTER TABLE ass...', Array)
#2 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Connection.php(581): Illuminate\Database\Connection->runQueryCallback('ALTER TABLE ass...', Array, Object(Closure))
#3 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Connection.php(370): Illuminate\Database\Connection->run('ALTER TABLE ass...', Array, Object(Closure))
#4 [internal function]: Illuminate\Database\Connection->statement('ALTER TABLE ass...')
#5 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(321): call_user_func_array(Array, Array)
#6 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Illuminate\Database\DatabaseManager->__call('statement', Array)
#7 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Illuminate\Database\DatabaseManager->statement('ALTER TABLE ass...')
#8 /home/www/snipe/app/models/CustomField.php(33): Illuminate\Support\Facades\Facade::__callStatic('statement', Array)
#9 /home/www/snipe/app/models/CustomField.php(33): Illuminate\Support\Facades\DB::statement('ALTER TABLE ass...')
#10 [internal function]: CustomField::{closure}(Object(CustomField))
#11 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(199): call_user_func_array(Object(Closure), Array)
#12 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(154): Illuminate\Events\Dispatcher->fire('eloquent.creati...', Object(CustomField), true)
#13 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1632): Illuminate\Events\Dispatcher->until('eloquent.creati...', Object(CustomField))
#14 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1533): Illuminate\Database\Eloquent\Model->fireModelEvent('creating')
#15 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1456): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder), Array)
#16 /home/www/snipe/app/controllers/admin/CustomFieldsController.php(93): Illuminate\Database\Eloquent\Model->save()
#17 [internal function]: Controllers\Admin\CustomFieldsController->storeField()
#18 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)
#19 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(93): Illuminate\Routing\Controller->callAction('storeField', Array)
#20 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(62): Illuminate\Routing\ControllerDispatcher->call(Object(Controllers\Admin\CustomFieldsController), Object(Illuminate\Routing\Route), 'storeField')
#21 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(967): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Controllers\Adm...', 'storeField')
#22 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#23 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
#24 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1033): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#25 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#26 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#27 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#28 /home/www/snipe/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#29 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true)
#30 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#31 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#32 /home/www/snipe/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#33 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#34 /home/www/snipe/public/index.php(49): Illuminate\Foundation\Application->run()
#35 {main}

Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1059 Identifier name '_snipeit_______________________________________________________________' is too long (SQL: ALTER TABLE assets ADD COLUMN (_snipeit_______________________________________________________________ TEXT))' in /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Connection.php:625
Stack trace:
#0 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Connection.php(581): Illuminate\Database\Connection->runQueryCallback('ALTER TABLE ass...', Array, Object(Closure))
#1 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Connection.php(370): Illuminate\Database\Connection->run('ALTER TABLE ass...', Array, Object(Closure))
#2 [internal function]: Illuminate\Database\Connection->statement('ALTER TABLE ass...')
#3 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(321): call_user_func_array(Array, Array)
#4 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Illuminate\Database\DatabaseManager->__call('statement', Array)
#5 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Illuminate\Database\DatabaseManager->statement('ALTER TABLE ass...')
#6 /home/www/snipe/app/models/CustomField.php(33): Illuminate\Support\Facades\Facade::__callStatic('statement', Array)
#7 /home/www/snipe/app/models/CustomField.php(33): Illuminate\Support\Facades\DB::statement('ALTER TABLE ass...')
#8 [internal function]: CustomField::{closure}(Object(CustomField))
#9 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(199): call_user_func_array(Object(Closure), Array)
#10 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(154): Illuminate\Events\Dispatcher->fire('eloquent.creati...', Object(CustomField), true)
#11 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1632): Illuminate\Events\Dispatcher->until('eloquent.creati...', Object(CustomField))
#12 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1533): Illuminate\Database\Eloquent\Model->fireModelEvent('creating')
#13 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1456): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder), Array)
#14 /home/www/snipe/app/controllers/admin/CustomFieldsController.php(93): Illuminate\Database\Eloquent\Model->save()
#15 [internal function]: Controllers\Admin\CustomFieldsController->storeField()
#16 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)
#17 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(93): Illuminate\Routing\Controller->callAction('storeField', Array)
#18 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(62): Illuminate\Routing\ControllerDispatcher->call(Object(Controllers\Admin\CustomFieldsController), Object(Illuminate\Routing\Route), 'storeField')
#19 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(967): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Controllers\Adm...', 'storeField')
#20 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#21 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
#22 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1033): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#23 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#24 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#25 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#26 /home/www/snipe/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#27 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true)
#28 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#29 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#30 /home/www/snipe/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#31 /home/www/snipe/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#32 /home/www/snipe/public/index.php(49): Illuminate\Foundation\Application->run()
#33 {main} [] []

Mysql 5.5.47
PHP 5.5.9-1ubuntu4.14
Snipe-It 2.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants