Announcement

Collapse
No announcement yet.

Espo 5.3.6 Espo.ERROR: Unknown column type "jsonObject" requested.

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

  • Espo 5.3.6 Espo.ERROR: Unknown column type "jsonObject" requested.

    Hi,

    I'm having this strange error when invoking Rebuild in development tree of espocrm, checkout from git, tag 5.3.6. I'm using MySQL 5.7.21.

    Code:
    [2018-09-15 16:34:43] Espo.WARNING: E_WARNING: Declaration of Espo\Core\Utils\Database\DBAL\Schema\Table::addIndex(array $columnNames, $indexName = NULL, array $flags = Array) should be compatible with Doctrine\DBAL\Schema\Table::addIndex(array $columnNames, $indexName = NULL, array $flags = Array, array $options = Array) {"code":2,"message":"Declaration of Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table::addIndex(array $columnNames, $indexName = NULL, array $flags = Array) should be compatible with Doctrine\\DBAL\\Schema\\Table::addIndex(array $columnNames, $indexName = NULL, array $flags = Array, array $options = Array)","file":"/home/michib/espocrm-5.3.6/application/Espo/Core/Utils/Database/DBAL/Schema/Table.php","line":35} []
    [2018-09-15 16:36:55] Espo.WARNING: E_WARNING: Declaration of Espo\Core\Utils\Database\DBAL\Schema\Table::addIndex(array $columnNames, $indexName = NULL, array $flags = Array) should be compatible with Doctrine\DBAL\Schema\Table::addIndex(array $columnNames, $indexName = NULL, array $flags = Array, array $options = Array) {"code":2,"message":"Declaration of Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table::addIndex(array $columnNames, $indexName = NULL, array $flags = Array) should be compatible with Doctrine\\DBAL\\Schema\\Table::addIndex(array $columnNames, $indexName = NULL, array $flags = Array, array $options = Array)","file":"/home/michib/espocrm-5.3.6/application/Espo/Core/Utils/Database/DBAL/Schema/Table.php","line":35} []
    [2018-09-15 16:36:55] Espo.ERROR: Fault to rebuild database schema. Details: Unknown column type "jsonObject" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database introspection then you might have forgotten to register all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mapping information. [] []
    [2018-09-15 16:36:55] Espo.ERROR: API [POST]:/Admin/rebuild, Params:Array ( ) , InputData:  - Error while rebuilding database. See log file for details. [] []
    [2018-09-15 16:36:55] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /api/v1/Admin/rebuild [] []
    Also tried a clean install of db but did not help. Any ideas?

    thanks,
    Michele

  • #2
    Did you follow these steps to properly install EspoCRM, https://github.com/espocrm/espocrm#h...for-developers.
    Job Offers and Requests

    Comment


    • #3
      Originally posted by tarasm View Post
      Did you follow these steps to properly install EspoCRM, https://github.com/espocrm/espocrm#h...for-developers.
      Hi Taras,

      Yes, hopefully! I have been working on Espo development for the last months... never had that problem. I saw here https://forum.espocrm.com/forum/deve...ject-requested that someone had pretty the same...

      I have been using 5.3.5 than I had to switch to 5.3.6 because of a bug with AD 1.32 in quotes (Yuri suggested me to go up to version 5.3.6 and indeed it solved that bug). At first I didn't realize of this error while rebuilding. Then I thought it could be related to Mariadb 5.5... a db problem... but did not helped going to mysql5.6 nor 5.7. Still using php 7.1.8.

      It goes away in Espo 5.4.3.

      thanks,
      Michele

      Comment


      • #4
        Hi,

        I encountered the same issue and turns out it's the composer.json file that causes this issue.

        Why?
        • composer.json has doctrine/dbal with version 2.*.* mentioned.
        • In composer.lock of espocrm it uses specific version which is 2.4.2
        • The latest version of doctrine for major version 2 is 2.9.0
        • When you do composer install if you don't have composer.lock the latest version is downloaded and installed.
        For those of you who don't know, composer.lock is a very important file that keeps track of specific version of package required for espocrm or any other php package.

        In my case, I wrote a composer.json to install espocrm and after that wrote a post-install-cmd script to handle the folder structure.

        Reference:

        Comment

        Working...
        X