CRM Broken After Upgrade From 6.0.9 to 6.1.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tobias
    Senior Member
    • May 2016
    • 229

    CRM Broken After Upgrade From 6.0.9 to 6.1.2

    We've just upgraded from 6.0.9 to 6..1.2 (using CLI) and now, the CRM is no longer working and an error 500 is shown.

    Here's the log:

    Code:
    [2021-02-04 10:07:32] Espo.ERROR: Slim Application Error Type: Error Code: 0 Message: Class 'Espo\Core\Utils\Database\DBAL\Platforms\MySqlPlatform' not found File: /home/site/wwwroot/application/Espo/Core/Utils/Database/DBAL/Driver/PDOMySql/Driver.php Line: 46 Trace: #0 /home/site/wwwroot/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(218): Espo\Core\Utils\Database\DBAL\Driver\PDOMySql\Driver->getDatabasePlatform() #1 /home/site/wwwroot/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(155): Doctrine\DBAL\Connection->__construct(Array, Object(Espo\Core\Utils\Database\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager)) #2 /home/site/wwwroot/application/Espo/Core/Utils/Database/Helper.php(90): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration)) #3 /home/site/wwwroot/application/Espo/Core/Utils/Database/Helper.php(59): Espo\Core\Utils\Database\Helper->createDbalConnection() #4 /home/site/wwwroot/application/Espo/Core/Utils/Database/Helper.php(228): Espo\Core\Utils\Database\Helper->getDbalConnection() #5 /home/site/wwwroot/application/Espo/Core/Utils/Database/Helper.php(256): Espo\Core\Utils\Database\Helper->getTableEngine('action_history_...') #6 /home/site/wwwroot/application/Espo/Core/Utils/Database/Helper.php(278): Espo\Core\Utils\Database\Helper->isSupportsFulltext('action_history_...', false) #7 /home/site/wwwroot/application/Espo/Core/Utils/Database/Orm/Converter.php(551): Espo\Core\Utils\Database\Helper->isTableSupportsFulltext('action_history_...') #8 /home/site/wwwroot/application/Espo/Core/Utils/Database/Orm/Converter.php(226): Espo\Core\Utils\Database\Orm\Converter->applyFullTextSearch(Array, 'ActionHistoryRe...') #9 /home/site/wwwroot/application/Espo/Core/Utils/Database/Orm/Converter.php(184): Espo\Core\Utils\Database\Orm\Converter->convertEntity('ActionHistoryRe...', Array) #10 /home/site/wwwroot/application/Espo/Core/Utils/Database/Converter.php(67): Espo\Core\Utils\Database\Orm\Converter->process() #11 /home/site/wwwroot/application/Espo/Core/Utils/Metadata/OrmMetadata.php(87): Espo\Core\Utils\Database\Converter->process() #12 /home/site/wwwroot/application/Espo/Core/Loaders/EntityManager.php(68): Espo\Core\Utils\Metadata\OrmMetadata->getData() #13 /home/site/wwwroot/application/Espo/Core/Container.php(226): Espo\Core\Loaders\EntityManager->load() #14 /home/site/wwwroot/application/Espo/Core/Container.php(72): Espo\Core\Container->load('entityManager') #15 /home/site/wwwroot/application/Espo/Core/ORM/EntityManagerProxy.php(55): Espo\Core\Container->get('entityManager') #16 /home/site/wwwroot/application/Espo/Core/ORM/EntityManagerProxy.php(63): Espo\Core\ORM\EntityManagerProxy->getEntityManager() #17 /home/site/wwwroot/application/Espo/Core/ApplicationUser.php(63): Espo\Core\ORM\EntityManagerProxy->getEntity('User', 'system') #18 /home/site/wwwroot/application/Espo/Core/ApplicationRunners/Api.php(177): Espo\Core\ApplicationUser->setupSystemUser() #19 /home/site/wwwroot/application/Espo/Core/ApplicationRunners/Api.php(112): Espo\Core\ApplicationRunners\Api->processRequest(Array, Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper), Array) #20 /home/site/wwwroot/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): Espo\Core\ApplicationRunners\Api->Espo\Core\ApplicationRunners\{closure}(Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) #21 /home/site/wwwroot/vendor/slim/slim/Slim/Routing/Route.php(381): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) #22 /home/site/wwwroot/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\Route->handle(Object(Slim\Psr7\Request)) #23 /home/site/wwwroot/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #24 /home/site/wwwroot/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #25 /home/site/wwwroot/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\Routing\Route->run(Object(Slim\Psr7\Request)) #26 /home/site/wwwroot/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(60): Slim\Routing\RouteRunner->handle(Object(Slim\Psr7\Request)) #27 /home/site/wwwroot/vendor/slim/slim/Slim/MiddlewareDispatcher.php(140): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner)) #28 /home/site/wwwroot/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): class@anonymous->handle(Object(Slim\Psr7\Request)) #29 /home/site/wwwroot/vendor/slim/slim/Slim/MiddlewareDispatcher.php(140): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(class@anonymous)) #30 /home/site/wwwroot/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous->handle(Object(Slim\Psr7\Request)) #31 /home/site/wwwroot/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle(Object(Slim\Ps... [] []
    Please assist, since we really need the CRM.
  • tarasm
    Super Moderator
    • Mar 2014
    • 573

    #2
    Try to run the command via cli:

    Code:
    php rebuild.php
    Job Offers and Requests

    Comment

    • tarasm
      Super Moderator
      • Mar 2014
      • 573

      #3
      There is no direct upgrade from 6.0.9 to 6.1.2. Did you run in 2 steps?
      1. From 6.0.9 to 6.0.10
      2. From 6.0.10 to 6.0.12

      What is your PHP version?
      Database version?

      Thanks
      Last edited by tarasm; 02-04-2021, 10:44 AM.
      Job Offers and Requests

      Comment

      • tobias
        Senior Member
        • May 2016
        • 229

        #4
        Tried the rebuild of course. And I upgraded in two steps, from 6.0.9 to 6.0.10 and from 6.0.10 to 6.1.2 with the upgrade packages provided here: https://www.espocrm.com/download/upgrades/

        PHP: 7.2.5
        Database: MySQL 5.7.29-log

        It's an Azure Web App running on nginx.
        Last edited by tobias; 02-04-2021, 01:25 PM.

        Comment

        • item
          Active Community Member
          • Mar 2017
          • 1489

          #5
          Hello,
          maybe :
          download last version of espoCRM 6.1.2 .. the zip.
          delete vendor/doctrine from your server
          copy folder vendor/doctrine from zip ..to your server
          make a rebuild.php

          That will do the trick...if of course your server/php/mysql is in requirement.
          If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

          Comment

          • tobias
            Senior Member
            • May 2016
            • 229

            #6
            item thanks for your reply. I did so, but no effect. Here's the error message I see after rebuild:
            Code:
            [2021-02-05 06:50:04] Espo.ERROR: Uncaught Exception Error: "Class 'Doctrine\DBAL\Configuration' not found" at /home/site/wwwroot/application/Espo/Core/Utils/Database/Helper.php line 88 {"exception":"[object] (Error(code: 0): Class 'Doctrine\\DBAL\\Configuration' not found at /home/site/wwwroot/application/Espo/Core/Utils/Database/Helper.php:88)"} []

            Comment

            • yuri
              Member
              • Mar 2014
              • 8552

              #7
              I'd suggest that you download the fresh EspoCRM of the latest version and compare all files with your instance using some tool. It seems to me that you have mix of files from the last version and from the previous version. Weird how this could happen. Our upgrade script should throw an error if some file could not be copied or removed and upgrade should be reverted automatically. In your cause it bypassed it somehow.
              If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

              Comment

              • tobias
                Senior Member
                • May 2016
                • 229

                #8
                There's a LOT of files that I would need to compare. What about simply uploading all files from the last stable version I had?

                Comment

                • yuri
                  Member
                  • Mar 2014
                  • 8552

                  #9
                  I meant using some tool that automatically will show the diff.

                  > What about simply uploading all files from the last stable version I had?

                  Not sure if I get. If you want to revert it's better to restore a backup if you have.
                  If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                  Comment

                  • tobias
                    Senior Member
                    • May 2016
                    • 229

                    #10
                    I did a quick research to find a diff checker for multiple files and wasn't really successful. Can you recommend a tool?

                    What I meant: Knowing what files changed when upgrading from 6.0.10 to 6.1.2, I could simply replace those files again with the files from 6.0.10, right?

                    Comment


                    • yuri
                      yuri commented
                      Editing a comment
                      There will be multiple unwanted files from the new version. You will need to remove them first.
                  • yuri
                    Member
                    • Mar 2014
                    • 8552

                    #11
                    I'd try the following.

                    1. Replace the whole 'vendor' directory with the folder from the fresh Espo package
                    2. Manually remove files that are supposed to be removed by upgrade. You can find the list of these files in the manifest.json file in the upgrade package.
                    3. Copy all files that are supposed to be copied by upgrade. They are located in the 'files' folder in the upgrade package.
                    Last edited by yuri; 02-05-2021, 07:59 AM.
                    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                    Comment


                    • tobias
                      tobias commented
                      Editing a comment
                      Yes, that did the trick

                      However, what's still wrong: GUI shows 6.0.10 being the current version. Can we simply update the config.php in /data ?
                  • yuri
                    Member
                    • Mar 2014
                    • 8552

                    #12
                    Check whether you have the file application/Espo/Core/Utils/Database/DBAL/Driver/PDOMySql/Driver.php. This one should have been removed by upgrade.
                    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                    Comment


                    • tobias
                      tobias commented
                      Editing a comment
                      Yes, this file sits in application/Espo/Core/Utils/Database/DBAL/Driver/PDOMySql - should I delete it and run another rebuild?

                    • yuri
                      yuri commented
                      Editing a comment
                      You need to delete all needed files first. See my previous post.

                      Then run a rebuild.
                  • Maximus
                    Senior Member
                    • Nov 2018
                    • 2731

                    #13
                    Hi tobias,
                    We tried to reproduce the issue in the same environment with the way you did it (CLI + upgrade packages). We did not face any issue.
                    Could you run this command in your terminal in order to check you PHP CLI version?
                    Code:
                    php -v

                    Comment


                    • tobias
                      tobias commented
                      Editing a comment
                      PHP 7.2.5 (cli) (built: May 5 2018 00:45:23) ( NTS )
                      Copyright (c) 1997-2018 The PHP Group
                      Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
                      with Zend OPcache v7.2.5, Copyright (c) 1999-2018, by Zend Technologies
                  • tobias
                    Senior Member
                    • May 2016
                    • 229

                    #14
                    yuri It worked! However, what's still wrong: GUI shows 6.0.10 being the current version. Can we simply update the config.php in /data ?

                    Comment

                    • tobias
                      Senior Member
                      • May 2016
                      • 229

                      #15
                      And one more problem: the Kanban view no longer works.

                      Here's the error code:

                      Code:
                      [2021-02-10 10:20:52] DEBUG: API (42S02) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'crm.kanban_order' doesn't exist; GET /Lead/action/listKanban; Route pattern: /{controller}/action/{action}; Route params: Array ( [controller] => Lead [action] => listKanban ) [] []
                      [2021-02-10 10:20:52] ERROR: (42S02) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'crm.kanban_order' doesn't exist; GET /Lead/action/listKanban; line: 93, file: /home/site/wwwroot/application/Espo/ORM/SthCollection.php [] []
                      Please assist, not quite happy with the recent updates tbh.

                      Comment

                      Working...