Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
entity.JPG | 60.06 KB | yosef.homsy |
Comments
Comment #1
yosef.homsy CreditAttribution: yosef.homsy commentedComment #2
interdruper CreditAttribution: interdruper commentedHave you tried the last 7.x-2.x-dev version? It fixed this same error for me.
Comment #3
yosef.homsy CreditAttribution: yosef.homsy commentedi already tried but still the same
Comment #4
jsacksick CreditAttribution: jsacksick commentedIs it still happening?
Comment #5
jsacksick CreditAttribution: jsacksick commentedComment #6
TimeBandit CreditAttribution: TimeBandit commentedJust 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.
Comment #7
littledynamo CreditAttribution: littledynamo commentedI am experiencing the same issue in version 7.x-2.0-rc5+13-dev. Bumping to critical. Module is unusable with this error.
Comment #8
littledynamo CreditAttribution: littledynamo commentedP.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.
Comment #9
littledynamo CreditAttribution: littledynamo commentedActually, 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
Comment #10
sebastiendan CreditAttribution: sebastiendan commentedI 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.
Comment #11
sebastiendan CreditAttribution: sebastiendan commentedI 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.
Comment #12
rwilson0429 CreditAttribution: rwilson0429 commentedUnder 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.
Comment #13
rcodina CreditAttribution: rcodina commentedComment #14
komlenic CreditAttribution: komlenic as a volunteer commentedAs 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.