Closed (fixed)
Project:
Entity reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2012 at 18:29 UTC
Updated:
19 Jun 2015 at 17:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ezra-g commentedI'm troubleshooting similar behavior at #1851766: Error when bulk deleting content.
Printing $node at the top of node_save() shows that $node->field_og_group_ref[und][0][target_id] is set to 'group' rather than a target ID or being blank.
Comment #2
ezra-g commentedThis seems to be coming from _entityreference_devel_generate():
Returns an array such as:
Sets the target_id to 'group' rather than an entity ID.
Comment #3
ezra-g commentedWith this patch, I'm able to generate nodes within groups successfully.
Comment #4
kristofferwiklund commentedThis patch works nice. Solved my problem
Comment #5
jolidog commentedWorked great for me to! Thank you!
Comment #6
rainman-2 commentedWorked for me too! Thanks!
Comment #7
darrell_ulm commentedPatch applied fine, although on using devel create content, error still occurs on the entity reference.
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value:
note: content types w/ node references can be created, only if there are no nodes of the type referencing yet created.
Comment #8
WorldFallz commentedmake sure you clear the cache-- the patch fixed the error in #7 for me.
Comment #9
amitaibuCommitted, thanks.
Comment #11
benjifisherI marked #1916376: Devel Generate error on target id column as a duplicate.
I prefer the patch in that issue to the one committed in this one. It seems like an odd use of a loop:
Comment #12
dwwI ran into this while trying to use devel_generate with project and project_issue nodes to get us closer to the D7 port of d.o...
Agreed, the committed code is a bit weird (although it works). Here's a new patch that takes some of the code from #1916376: Devel Generate error on target id column, although I renamed
$random_entityto$random_bundleto be more accurately self-documenting.Thanks,
-Derek
Comment #13
duaelfrThanks dww ! It is a lot better for websites having a lot of group types.
Comment #14
aaronbauman#12 rtbc ftw
Comment #15
seanrPatch doesn't appear to apply anymore, but I patched it manually and it works just fine. This is definitely RTBC and would love to see it go in soon.
Comment #16
tostinni commentedThe latest dev version already got this fix in, so you should use it to avoid this bug.
Comment #17
benjifisherRight. The patch in #3 was committed: see #9. The issue was closed (#10) and @dww reopened it (#12) with an alternative patch. Either way, the issue should be fixed in the next release. (I have not checked the latest dev release, but @tostinni says it contains the fix.)
Comment #18
chrowe commentedUsing the current dev release ( drush dl entityreference --dev ) I still get an error trying to generate nodes that reference other nodes using entityreference.
Took patch from 12 and manually applied it. This fixed my issue and I can now generate nodes that reference other nodes. As long as there are existing nodes to reference.
patch attached.
Comment #19
chrowe commentedComment #20
dutchyodaJust tested the patch and it works.
Comment #21
marblegravy commentedTesting with dev build (downloaded today) and it all works as expected.
Comment #22
LeviThomason commentedConfirming entityreference 7.x-1.0+7-dev (2013-Jun-06) and patch in #18 works :)
Comment #23
basvredeling+1 works
Comment #24
ryanoreilly commentedAlso confirming Dev fixes issue.
Comment #24.0
ryanoreilly commentedgenarate to generate
Comment #25
andypost+1 RTBC
Also related #1822844: Notice: Undefined index: revision_id in field_collection_field_get_entity() (line 1586 of field_collection/field_collection.modu
Comment #26
andypostCan we get this in?
Comment #27
amitaibuMerged, thanks.