1

When using any Drupal 8 link field to dynamically link to a node, I start typing the title and the typeahead function starts providing options to chose from. These are Drupal field types such as Link or Entity Reference.

For various reasons, sometimes the correct title doesn't appear and I can't choose it using what's in the typeahead choices. In those cases, I always just used:

entity:node/[node_id_number]

I'm trying to do that now, and Drupal isn't recognizing it as a valid entity. I keep getting the error message:

There are no entities matching "entity:node/6491".

I've tried typing it every which way I could think of, figuring I just forgot the correct syntax. I tried:

/entity:/node/6491
/entity:node/6491
entity:/node/6491
/entity: node/6491

and more.

Can anyone tell me what I'm doing wrong? Or was it all just a fever dream and I was never able to fill in a typeahead link field using 'entity'?

2
  • I think that format works in the Redirect module UI, maybe that's what you're thinking of?
    – Clive
    Nov 1, 2018 at 15:00
  • This would be a Drupal link field, or an entity reference field. I'll edit my question to clarify that, thanks.
    – LeraA
    Nov 1, 2018 at 15:06

1 Answer 1

2

Ooooooooookay.

The entity:node/[node_id_number] only works in a Drupal link field. It does NOT work in a Drupal entity reference field.

Although both of those fields feature the typeahead function and link to other nodes, you cannot use entity:node/[node_id_number] to fill in an entity reference typeahead field.

Thanks @Clive for making me clarify my field types and start down the path to seeing my wrong assumption.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.