when i using the Entity Reference View Widget with rules module this error coming "The referenced entity (node: 203) is invalid."
the scenario like this:
there is rule to change the value for specific field in any node referenced to the main node but when editing the main node which have the references or changing the referencing node to another ones the last error coming and if you stop the rule the entity reference view widget working fine

please check the attached Pic.

CommentFileSizeAuthor
entity.JPG60.06 KByosef.homsy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yosef.homsy’s picture

Version: 7.x-2.x-dev » 7.x-2.0-beta3
interdruper’s picture

Have you tried the last 7.x-2.x-dev version? It fixed this same error for me.

yosef.homsy’s picture

i already tried but still the same

jsacksick’s picture

Is it still happening?

jsacksick’s picture

Status: Active » Postponed (maintainer needs more info)
TimeBandit’s picture

Just ran into similar error with rc5. I am using it so user can choose pages (nodes) from the site using a table view. I can use checkboxes to select pages; pages are added back to the edit screen once modal disappears but on trying to save node i get "The referenced entity (node: 1) is invalid."

Only way I can save the node is to uncheck all nodes which have been added, then save.

littledynamo’s picture

Priority: Major » Critical
Status: Postponed (maintainer needs more info) » Active

I am experiencing the same issue in version 7.x-2.0-rc5+13-dev. Bumping to critical. Module is unusable with this error.

littledynamo’s picture

P.s. I've tried each of the suggestions from this issue: https://www.drupal.org/node/1906118 - turned off caching, removed any arguments and removed "Link title to node". Didn't help.

littledynamo’s picture

Priority: Critical » Normal
Status: Active » Closed (works as designed)

Actually, scratch that, it was me being stupid. When setting up the site, I'd attempted using the regular Entity Reference View display instead of Entity Reference View Widget and I had the config mixed up.

The solution was to ensure that on the field edit screen, the "Entity Selection Mode" was set to "Simple" rather than "Views: Filter by an entity reference view". As per instructions at https://www.drupal.org/node/2305545

sebastiendan’s picture

Version: 7.x-2.0-beta3 » 7.x-2.0-rc6
Priority: Normal » Critical
Status: Closed (works as designed) » Active

I am facing the same issue with 7.x-2.0-rc6, the node referencing entities cannot be saved.
Please do not close the issue because you realized you made a mistake on your side.

sebastiendan’s picture

I found the origin of the problem: when selecting "Simple" as Entity Selection Mode in field edit screen, we can filter entity types that can be referenced by the field.
The problem is that these filters are not linked to the filters you set in your view, so in the widget you will find contents of any type.
As a consequence, if you select a content whose type was not selected in the field edit screen, the error raises.

rwilson0429’s picture

Under the entity reference field settings, changing the Entity selection mode from "Views: Filter by an entity reference view" to "Simple (with optional filter by bundle)" resolved the issue for me.

Thanks littledynamo for getting me started in the right direction.

rcodina’s picture

komlenic’s picture

As mentioned in #9 and #11, ensuring that the Entity selection mode is "Simple" resolved this issue for me. It seems that this particular thread/issue may be encompassing several issues.