I have a problem
I get error
{
"message": "[function missing(..)] unexpected field 'my.primary.subRouteLevel2' on line:1 col:90 in query '[[at(my.primary.domain, "campaigns")][at(my.primary.subRouteLevel1, "platform")][missing(my.primary.subRouteLevel2)]]'\n[[at(my.primary.domain, "campaigns")][at(my.primary.subRouteLevel1, "platform")][missing(my.primary.subRouteLevel2)]]\n ^\n",
"type": "parsing-error",
"line": 1,
"column": 90,
"id": 0,
"location": "query"
}
Strange is in that I have two similar Types on different repositories (dev/prod) and on dev all work gr8 but on prod get this error
Thanks for posting. Let’s see if we can work through this together.
For starters, I need to look at the code where you’re make your API call. Could you paste that file into a GitHub Gist and post it here? (Make sure not to include any sensitive information.)
Also, could you tell me what technologies you’re using?
Sometimes the API returns this error if you have no documents published in the type you’re querying. Do you have any documents published with that type? If not, does it fix the error if you publish one document with the type “primarytest”?
Hi Sam,
Yes, I publish DOC based on “primarytest” type and have this error.
Stranging in, I have 2 repositories -1st I used for dev env, and when the time come to MVP release, I copy/past custom type json from 1st repo to 2nd, after I create doc and fill with data. And this query good work on 1st repo and throw me error on 2nd =(
I’ve done some investigation, and I might have found the cause of the error.
Can you make sure you have two documents created — one with subRouteLevel2 defined and one without subRouteLevel2 defined? Then test the API call again and let me know if it works?
I'm having the same issue, though I'm not in a position where I can just create another document of the same type – it's the homepage and it would break our website. For now I'm fetching all documents and filtering client side but it is far from optimal.