0

I have a Drupal 8, core version:8.8.x project, i'm using inline entity form module(latest version) for entity reference fields. Also i have tried using entity connect module but it caused various issues. The problem is when creating a new node, using the inline entity form and the reference method of field is Views: Filter by an entity reference view this error is coming up:

This entity (node: newNode) cannot be referenced.

How to reproduce:

  1. Install inline entity form module
  2. Create an entity reference field in any content type with Views: Filter by an entity reference view as reference method.
  3. To your content type manage form display choose inline entity form - complex for widget.
  4. Add new node for your content type, press add new node to your reference field, fill the modal form, publish it and press create new node(referenced node).
  5. Lastly publish and save your node.

I tried some patches published to project issues but most of them are not applying at all. I would appreciate any ideas for solving it or suggestions for using a similar module.

2
  • Did you assign a specific View Display (of type Entity reference) under the Views: Filter by an entity reference view option? Do you want your reference field to be able to assign both existing nodes, and also create new ones with the Inline entity form? Because if not, you don't need the Views filter option, right?
    – prkos
    Commented Jun 5, 2020 at 20:17
  • Firstly thanks for your reply, i have assigned a specific view display and yes i'd like to add existing and create new nodes. @prkos
    – GSA
    Commented Jun 16, 2020 at 9:23

1 Answer 1

0

See patch located

Drupal core patch

#42 works with Drupal 8.9.2 give that a try, it should fix your problem.

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.