When creating a new node the entityreference fields do not autocomplete. There's no error in console or PHP.
The actual request URL simply returns an empty JSON, here's the source code:
[]
The request URL has format:
https://example.com/en/entityreference/autocomplete/single/field_myfield/node/contenttype/NULL/forest
On existing nodes the same field works, the request simply contains the requesting nid instead of "NULL" like this:
https://example.com/en/entityreference/autocomplete/single/field_myfield/node/contenttype/123/forest
Comments
Comment #2
vacilando commentedComment #3
vacilando commentedI used views for entity selection and in there token [node:content-type:machine-name], which was obviously empty for new nodes.
Works as designed; closing.