Closed (fixed)
Project:
Entity Dependency API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2012 at 10:38 UTC
Updated:
3 Dec 2013 at 12:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
David_Rothstein commentedThis seems to be more than just PHP notices - I'm seeing it result in entityreference fields not being processed for dependencies correctly at all.
The attached patch is based on a similar fix for the UUID module (see #1511274: entityreference_field_uuid_load() and entityreference_field_uuid_presave() use wrong target_type source) and seems to work.
Comment #3
David_Rothstein commentedComment #4
danielb commentedI have confirmed the bug, both the notice appearing and through debugging the iterator that the dependency is missing.
David_Rothstein's patch does indeed fix both.
Comment #5
skwashd commentedI have also tested this and found that it fixes the issue outlined above.
Comment #6
skwashd commented#1: entity-dependency-entityreference-1545278-1.patch queued for re-testing.
Comment #7
jneubert commented#1: entity-dependency-entityreference-1545278-1.patch queued for re-testing.
Comment #8
jneubert commentedI came across the issue described above, and the patch worked for me.
Comment #9
bricel commentedThis is related to a change in Entity reference, $item['target_type'] has moved to $field['settings']['target_type'], so line 149, 150 should look like this:
$info = entity_get_info($field['settings']['target_type']);
entity_dependency_add($dependencies, $item, $field['settings']['target_type'], $info['entity keys']['id']);
Attached patch.
Comment #10
boobaaRan into the same problem, which was solved by the patch in #1. I don't know how could #9 be related to this, as I didn't need it, so I'm not touching the issue status.
Comment #11
mpgeek commented#9 fixed this issue for me.
Comment #12
microhate commented#1: entity-dependency-entityreference-1545278-1.patch queued for re-testing.
Comment #13
microhate commentedFor sure #9 can not work correct.
Entity reference always use target_id to store entity id. If patch #9 we use $info['entity keys']['id'] to get property name, so it would be nid for node or tid for term.
#9 solve problem with notices but does not get dependencies correct.
Patch #1 is correct way. It works for me.
Here is #1 correct applied for current dev branch.
Comment #15
igor.ro commented#13: 1545278-entity_dependency_entity_reference_fix-13.patch queued for re-testing.
Comment #17
maciej.zgadzaj commentedRe-rolled.
Comment #18
maciej.zgadzaj commentedConsidering that several people already confirmed this solution fixed the issue for them and that it tests ok now, should we RTBC?
Comment #19
igor.ro commentedI think yes.
Now we need to merge it to dev branch
Comment #20
rosk0Works like a charm.
Is there any estimate on when this will be committed?
Comment #21
lisa.rae commentedConfirmed that patch in #17 above worked as well.
Comment #22
dixon_Committed. Thanks!
Comment #23
dixon_Was a bit late yesterday, forgot to mark issue accordingly.