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

Vacilando created an issue. See original summary.

vacilando’s picture

Issue summary: View changes
vacilando’s picture

Status: Active » Closed (works as designed)

I 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.