Invalid request response to graphql

In a suitecrm 8 instance I recently noticed that in the contact detail view to the following request


I get in response

Database failure. Please refer to suitecrm.log for details.

   "data": {
     "getBatchedStatistics": {
       "_id": "contacts",
       "id": "/api/batched-statistics/contacts",
       "items": {
         "contact-last-touchpoint": {
           "id": "contact-last-touchpoint",
           "_id": "contact-last-touchpoint",
           "messages": null,
           "options": null,
           "data": {
             "value": "-"
           "metadata": {
             "type": "single-value-statistic",
             "emptyValueString": "-",
             "dataType": "varchar",
             "labelKey": "LBL_STATISTIC_ERROR",
             "tooltip_title_key": "LBL_STATISTIC_ERROR_DESC_TOOLTIP",
             "descriptionKey": "LBL_STATISTIC_ERROR_DESC"
       "__typename": "BatchedStatistics"

Accompanied by the legend: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data. In addition, the request was resolved with status 200

The problem is that I understand this error causes other customizations not to show up. Specifically in Contacts/metadata/detailviewdefs.php I have commented a widget from the sidebarWidgets section and the modification is not shown

Any idea how to resolve this error?

Greetings and thanks in advance

I have managed to solve this problem by commenting out the topWidget entries in public/legacy/modules/Contacts/metadata/detailviewdefs.php


'topWidget' => [
    // 'type' => 'statistics',
    // 'options' => [
    //     'statistics' => [
    //         [
    //             'labelKey' => '',
    //             'type' => 'contact-last-touchpoint',
    //             'hideValueIfEmpty' => true
    //         ],
    //     ],
    // ],
    // 'acls' => [
    //     'Contacts' => ['view', 'list']
    // ]

But updating this file on the server with the mods that have worked on my local does not apply the change. I have applied a repair but without success. In the browser I have tried ctrl+f5 to do a full load or private mode but the described behavior persists

How can I make this change reflect on the server?


If you make any changes to detailview (for example via studio moving around fields) the file “public/legacy/modules/Contacts/metadata/detailviewdefs.php” is overrrided and a new file is created in
“public/legacy/custom/modules/Contacts/metadata/detailviewdefs.php”. So probably the file active on your server is the one in public/legacy/custom/modules/Contacts/metadata

Hello. Thank you very much for answering. That was exactly what was happening. Again thanks for the assistance