Detektivo icon indicating copy to clipboard operation
Detektivo copied to clipboard

Indexing a complex field in detektivo makes Cockpit say "Saving failed"

Open emdahlstrom opened this issue 6 years ago • 0 comments

Hi! We have a collection with complex field that makes Cockpit say "Saving failed" (though the content is saved).

If I set this particular field to be indexed in config.yaml cockpit always responds with "Saving failed". If I remove this field from being indexed everything is fine.

I previously opened a similar issue in Cockpit which I believed was fixed by updating to the newest Detektivo, but that only helped because the settings had moved from detektivo.yaml so in effect the problematic field wasn't indexed anymore. Now that I moved the detektivo config into the config.yaml the problem has come back.

One difference: Before I updated Detektivo, the ajax save call resulted in the following error: Warning: mb_strtolower() expects parameter 1 to be string, array given in /addons/Detektivo/vendor/teamtnt/tntsearch/src/Support/Tokenizer.php on line 8

With the newest detektivo and the config in the right place the ajax call returns with 200 ok. But the error message still pops up.

This is the problematic field:

{
  "fields": [
    {
      "type": "image",
      "label": "Image"
    },
    {
      "type": "set",
      "label": "Content",
      "options": {
        "fields": [
          {
            "name": "Subtitle",
            "type": "text"
          },
          {
            "name": "Text",
            "type": "wysiwyg"
          }
        ]
      }
    },
    {
      "type": "text",
      "label": "Youtube ID"
    }
  ]
}

I would love to help debug this but I need some pointers since I'm no longer getting an error message back with the ajax request.

emdahlstrom avatar Jan 30 '19 15:01 emdahlstrom