This message was deleted.
# community-help
s
This message was deleted.
k
Hi Sean, when do you get this error?
s
It’s happening when adding to the collection via my app. I’m using a plugin from my CMS which is adding via PHP.
k
That's really odd. Is the collection on Typesense cloud?
Can you please check the collection schema to see what it lists as the type for the
content
field?
s
Copy code
{
      "facet": false,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "content",
      "optional": true,
      "sort": false,
      "type": "string[]"
    },
k
And can you post a sample document that triggers this error? I might need access to the collection to figure out what's happening though.
s
I’m struggling to find the document that’s causing it. I’m trying to determine what one is causing it as the sample data I have isn’t showing anything obvious.
k
Possible to add logging to the plugin? The Typensese api will return error associated with the document
s
I’m trying to add some in, however it’s a third party one so not as straightforward as I would have liked. The error is a 400 RequestMalformed - again, still not able to determine the document yet.
OK, I’ve found the document that it’s erroring on. I’ve taken out some other fields as it contains sensitive information, but this is the content field that’s giving me the error.
Copy code
array:8 [▶
  "content" => array:3 [▶
    0 => "10 Km"
    1 => "Runthrough Chase The Moon Battersea Park 5k & 10k"
    3 => "Transferred"
  ]
  "post_date_timestamp" => 1690786080
  "id" => "2719427"
]
OK, so I think I’ve fixed it. I was filtering out null values from the array so added array_values() to reset the index and this seems to have worked.
k
Glad to hear that the issue is resolved!