Announcement

Collapse
No announcement yet.

Unable to add new fields using Entity manager. Error when running rebuild.

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

  • Unable to add new fields using Entity manager. Error when running rebuild.

    System seems to be working well, except I get the following errors in EspoCRM/data/log when attempting to add a field or trying to Rebuild:

    [2018-04-19 17:56:08] Espo.ERROR: Fault to rebuild database schema. Details: Unknown database type enum requested, Espo\Core\Utils\Database\DBAL\Platforms\MySqlPlatf orm may not support it. [] []
    [2018-04-19 17:56:08] Espo.ERROR: Uncaught Exception Espo\Core\Exceptions\Error: "Error while rebuilding database. See log file for details." at /var/www/www.hi2caliproductions.com/public_html/EspoCRM/application/Espo/Core/DataManager.php line 100 {"exception":"[object] (Espo\\Core\\Exceptions\\Error(code: 500): Error while rebuilding database. See log file for details. at /var/www/www.hi2caliproductions.com/public_html/EspoCRM/application/Espo/Core/DataManager.php:100)"} []
    [2018-04-19 18:04:57] Espo.ERROR: Fault to rebuild database schema. Details: Unknown database type enum requested, Espo\Core\Utils\Database\DBAL\Platforms\MySqlPlatf orm may not support it. [] []
    [2018-04-19 18:04:57] Espo.ERROR: API [POST]:/Admin/rebuild, Params:Array ( ) , InputData: - Error while rebuilding database. See log file for details. [] []
    [2018-04-19 18:04:57] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /EspoCRM/api/v1/Admin/rebuild [] []
    [2018-04-19 21:45:14] Espo.ERROR: Fault to rebuild database schema. Details: Unknown database type enum requested, Espo\Core\Utils\Database\DBAL\Platforms\MySqlPlatf orm may not support it. [] []
    [2018-04-19 21:45:14] Espo.ERROR: Uncaught Exception Espo\Core\Exceptions\Error: "Error while rebuilding database. See log file for details." at /var/www/www.hi2caliproductions.com/public_html/EspoCRM/application/Espo/Core/DataManager.php line 100 {"exception":"[object] (Espo\\Core\\Exceptions\\Error(code: 500): Error while rebuilding database. See log file for details. at /var/www/www.hi2caliproductions.com/public_html/EspoCRM/application/Espo/Core/DataManager.php:100)"} []
    [2018-04-19 21:46:34] Espo.ERROR: Fault to rebuild database schema. Details: Unknown database type enum requested, Espo\Core\Utils\Database\DBAL\Platforms\MySqlPlatf orm may not support it. [] []
    [2018-04-19 21:46:34] Espo.ERROR: API [POST]:/Admin/fieldManager/:scope, Params:Array ( [scope] => Account ) , InputData: {"type":"varchar","required":false,"trim":true, "dy namicLogicVisible":null,"dynamicLogicRequired":nul l,"dynamicLogicReadOnly":null,"name":"test","lab el ":"Test","tooltipText":"","default":"","maxLen gth" :null,"audited":false,"readOnly":false,"tooltip":f alse} - Error while rebuilding database. See log file for details. [] []
    [2018-04-19 21:46:34] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /EspoCRM/api/v1/Admin/fieldManager/Account [] []

    Have checked the logs but can't find anything obvious. Can you throw me a life-line?

    Thanks...
    Last edited by sleddie61; 04-19-2018, 09:56 PM.

  • #2
    Hello,
    did you create any custom field manually? or installed any extensions?
    or you have any extra tables in the database?

    Comment


    • #3
      no...was attempting to create a custom field but got the errors listed above...no installed extensions, and no extra tables.

      Comment


      • #4
        OK...going to start from scratch to reproduce error. No custom fields in the database yet nor any installed extensions. deleted logs, then did the following:
        1. Tried to add a custom field in Opportunity called signDate.
        2. Tried to run Rebuild using the Admin->System->Rebuild menu option (not php rebuild.php via CLI).

        This in turn, generated the following:

        data/logs:
        [2018-04-20 20:40:20] Espo.ERROR: Fault to rebuild database schema. Details: Unknown database type enum requested, Espo\Core\Utils\Database\DBAL\Platforms\MySqlPlatf orm may not support it. [] []
        [2018-04-20 20:40:21] Espo.ERROR: API [POST]:/Admin/fieldManager/:scope, Params:Array ( [scope] => Opportunity ) , InputData: {"type":"date","required":false,"dynamicLogicVisib le":null,"dynamicLogicRequired":null,"dynamicLogic ReadOnly":null,"name":"signDate","label":"SignDate ","tooltipText":"","default":null,"after":"","befo re":"","audited":false,"readOnly":false,"tooltip": false} - Error while rebuilding database. See log file for details. [] []
        [2018-04-20 20:40:21] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /EspoCRM/api/v1/Admin/fieldManager/Opportunity [] []
        [2018-04-20 20:42:11] Espo.ERROR: Fault to rebuild database schema. Details: Unknown database type enum requested, Espo\Core\Utils\Database\DBAL\Platforms\MySqlPlatf orm may not support it. [] []
        [2018-04-20 20:42:11] Espo.ERROR: API [POST]:/Admin/rebuild, Params:Array ( ) , InputData: - Error while rebuilding database. See log file for details. [] []
        [2018-04-20 20:42:11] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /EspoCRM/api/v1/Admin/rebuild [] []

        apache2 and syslog error logs show no errors.

        modsec_audit.log:
        {"type":"date","required":false,"dynamicLogicVisib le":null,"dynamicLogicRequired":null,"dynamicLogic ReadOnly":null,"name":"signDate","label":"SignDate ","tooltipText":"","default":null,"after":"","befo re":"","audited":false,"readOnly":false,"tooltip": false}
        --a724515a-F--
        HTTP/1.1 500 Internal Server Error
        Strict-Transport-Security: max-age=15552000; includeSubDomains
        Access-Control-Allow-Methods: POST, GET, PUT, PATCH, DELETE
        X-Status-Reason: Error while rebuilding database. See log file for details.
        Content-Length: 0
        Connection: close
        Content-Type: text/html;charset=UTF-8

        Any help appreciated...

        Comment


        • #5
          If database has mistake, any rebuild will response the error. Could you share with me your database?

          Comment


          • #6
            that's my suspicion. a pointer's messed up somewhere and i'm not familiar enough with the backend to troubleshoot it. how do i go about sharing the database with you? should i do a sqldump?

            Comment


            • #7


              I need only structure of database. And what do you mean in "a pointer's messed up somewhere". What pointer?

              Comment


              • #8
                what started my problem was i did a "sudo apt upgrade" instead of a "sudo apt update" about 2 wks ago. it dropped my system. i had a backup system setup to clone my drive using rsync to a backup drive. did a fresh install of EspoCRM then did a sqldump to repopulate the database. Problem is, I wasn't able to backup the EspoCRM files as instructed in your Backup and Restore section of the documentation. As a result, I think there is some old permissions that no longer link properly, resulting in permissions-related errors in the recovered (partially) system. will follow the instructions in the link you've sent. hopefully you can assist with tracking down a fix.

                thanks again for the help.

                Comment


                • #9
                  ran backup.sh, which generated a .gz. attempted to upload it but it flagged an error saying uploads of .gz not allowed...need help?

                  Comment


                  • #10

                    Status update: Did fresh install of EspoCRM-5.1.2, then imported my data from the old system. Everything working fine now.

                    Comment

                    Working...
                    X