Announcement

Collapse
No announcement yet.

Error create field after change server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error create field after change server

    Hello,

    I made a migration of ESPOCRM but not now gives me error when creating fields:

    [2016-08-08 21:55:43] Espo.WARNING: E_WARNING: Cannot use a scalar value as an array {"code":2,"message":"Cannot use a scalar value as an array","file":"/var/www/html/Portal/application/Espo/Core/Utils/Util.php","line":116} []
    [2016-08-08 21:55:43] Espo.ALERT: Rebuild database fault: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1 VARCHAR(255) DEFAULT NULL' at line 1 in /var/www/html/Portal/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:699 Stack trace: #0 /var/www/html/Portal/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(699): PDO->query('ALTER TABLE `va...') #1 /var/www/html/Portal/application/Espo/Core/Utils/Database/Schema/Schema.php(209): Doctrine\DBAL\Connection->executeQuery('ALTER TABLE `va...') #2 /var/www/html/Portal/application/Espo/Core/DataManager.php(90): Espo\Core\Utils\Database\Schema\Schema->rebuild('VariablesMotor') #3 /var/www/html/Portal/application/Espo/Core/DataManager.php(59): Espo\Core\DataManager->rebuildDatabase('VariablesMotor') #4 /var/www/html/Portal/application/Espo/Controllers/FieldManager.php(66): Espo\Core\DataManager->rebuild('VariablesMotor') #5 /var/www/html/Portal/application/Espo/Core/ControllerManager.php(116): Espo\Controllers\FieldManager->actionCreate(Array, Array, Object(Slim\Http\Request)) #6 /var/www/html/Portal/application/Espo/Core/Application.php(226): Espo\Core\ControllerManager->process('FieldManager', 'create', Array, Array, Object(Slim\Http\Request)) #7 [internal function]: Espo\Core\Application->Espo\Core\{closure}(NULL) #8 /var/www/html/Portal/vendor/slim/slim/Slim/Slim.php(1175): call_user_func(Object(Closure), NULL) #9 /var/www/html/Portal/vendor/slim/slim/Slim/Slim.php(1315): Slim\Slim->applyHook('slim.before.dis...') #10 /var/www/html/Portal/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #11 /var/www/html/Portal/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #12 /var/www/html/Portal/application/Espo/Core/Utils/Api/Auth.php(105): Slim\Middleware\MethodOverride->call() #13 /var/www/html/Portal/application/Espo/Core/Utils/Api/Slim.php(42): Espo\Core\Utils\Api\Auth->call() #14 /var/www/html/Portal/application/Espo/Core/Application.php(88): Espo\Core\Utils\Api\Slim->run() #15 /var/www/html/Portal/api/v1/index.php(33): Espo\Core\Application->run() #16 {main} Next Doctrine\DBAL\DBALException: An exception occurred while executing 'ALTER TABLE `variables_motor` ADD 1 VARCHAR(255) DEFAULT NULL': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1 VARCHAR(255) DEFAULT NULL' at line 1 in /var/www/html/Portal/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91 Stack trace: #0 /var/www/html/Portal/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(702): Doctrine\DBAL\DBALException::driverExceptionDuring Query(Object(PDOException), 'ALTER TABLE `va...', Array) #1 /var/www/html/Portal/application/Espo/Core/Utils/Database/Schema/Schema.php(209): Doctrine\DBAL\Connection->executeQuery('ALTER TABLE `va...') #2 /var/www/html/Portal/application/Espo/Core/DataManager.php(90): Espo\Core\Utils\Database\Schema\Schema->rebuild('VariablesMotor') #3 /var/www/html/Portal/application/Espo/Core/DataManager.php(59): Espo\Core\DataManager->rebuildDatabase('VariablesMotor') #4 /var/www/html/Portal/application/Espo/Controllers/FieldManager.php(66): Espo\Core\DataManager->rebuild('VariablesMotor') #5 /var/www/html/Portal/application/Espo/Core/ControllerManager.php(116): Espo\Controllers\FieldManager->actionCreate(Array, Array, Object(Slim\Http\Request)) #6 /var/www/html/Portal/application/Espo/Core/Application.php(226): Espo\Core\ControllerManager->process('FieldManager', 'create', Array, Array, Object(Slim\Http\Request)) #7 [internal function]: Espo\Core\Application->Espo\Core\{closure}(NULL) #8 /var/www/html/Portal/vendor/slim/slim/Slim/Slim.php(1175): call_user_func(Object(Closure), NULL) #9 /var/www/html/Portal/vendor/slim/slim/Slim/Slim.php(1315): Slim\Slim->applyHook('slim.before.dis...') #10 /var/www/html/Portal/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #11 /var/www/html/Portal/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #12 /var/www/html/Portal/application/Espo/Core/Utils/Api/Auth.php(105): Slim\Middleware\MethodOverride->call() #13 /var/www/html/Portal/application/Espo/Core/Utils/Api/Slim.php(42): Espo\Core\Utils\Api\Auth->call() #14 /var/www/html/Portal/application/Espo/Core/Application.php(88): Espo\Core\Utils\Api\Slim->run() #15 /var/www/html/Portal/api/v1/index.php(33): Espo\Core\Application->run() #16 {main} [] []
    [2016-08-08 21:55:43] Espo.ERROR: API [POST]:/Admin/fieldManager/:scope, Params:Array ( [scope] => VariablesMotor ) , InputData: {"type":"varchar","required":false,"trim":true,"na me":"1","label":"1","default":"","maxLength":null, "audited":false} - Error while rebuilding database. See log file for details. [] []
    [2016-08-08 21:55:43] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /Portal/api/v1/Admin/fieldManager/VariablesMotor [] []

    Any help?

    thanks.

  • #2
    What EspoCRM version do you use?
    Last edited by tarasm; 08-10-2016, 08:23 AM.
    Job Offers and Requests

    Comment


    • #3
      Hello,

      I'm using espocrm 4.1.6

      thanks.

      Comment


      • #4
        Based on your log I see the problem is in a custom field "variables_motor" . Try to change or remove it.
        Job Offers and Requests

        Comment


        • #5
          Hello tarasm,

          I left you a private message.

          thanks

          Comment


          • #6
            DSM, you are using an old EspoCRM version for developers. Please download the latest stable version here http://www.espocrm.com/download/
            Job Offers and Requests

            Comment

            Working...
            X