Hello
not all enitit references have target_type in value.
So we need to get it from field settings.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | uuid-wrong_target_type-1666220-13.patch | 708 bytes | maciej.zgadzaj |
| #6 | entity_reference_fix-last_dev.patch | 2 KB | igor.ro |
| #1 | entity_references_fix.patch | 1.96 KB | igor.ro |
Comments
Comment #1
igor.ro commentedHere is the patch.
Comment #2
piggito commentedSorry, i don't know if this is the right place to put this but I also got a problem with entityreferences and uuid.
Reading the code it seems that entityreferences uses a field "_target_id" which is an integer (10 digits) but the unique identifier is longer than that so the query results in an error.
Have anyone else got this error?
Comment #3
igor.ro commented@piggito
I have a lot of exp with uuid and entityreferences and uuid_features.
Are you using uuid_features module for this?
Comment #4
piggito commentedI was testing uuid_features but had problems and left it.
Do you think that the error could be caused by uuid_features?
Comment #5
igor.ro commentedhm... @piggito
please explain your case from functional point of view.
because
does not tell us any thing about the error.
Comment #6
igor.ro commentedHere is the new patch
Comment #7
mgiffordPatch still applies nicely against the git repository. What's the process to test this so we can mark it RTBC?
Comment #8
timaholt commentedI bet the problem @piggito is referencing is this issue: https://drupal.org/node/1541218
I've looked at this patch as a potential fix for that issue, it changes the error but doesn't solve it entirely. I'm not sure these issues are the same, but they do seem somewhat related.
Comment #9
timaholt commentedActually after some further testing, this patch does fix the issue at https://drupal.org/node/1541218
I'm marking this RBTC! Thanks igor.ro
Comment #10
skwashd commentedI'll look at committing this in the coming days.
Comment #11
timaholt commentedI'm marking this back as needs review, as it does fix the errors but the entity reference still isn't deployed using deploy correctly.
Comment #12
skwashd commentedUnassigning from myself as it still needs work.
Comment #13
maciej.zgadzaj commentedWell, big part of the previous patch (from #6) code is not really needed, on the contrary, it breaks the functionality. This issue was actually fixed in #1511274: entityreference_field_uuid_load() and entityreference_field_uuid_presave() use wrong target_type source.
The deployment problem on the other hand should be fixed by the last patch in #1545278: Dependencies are not added for entityreference fields (Symptom: "Undefined index: target_type") (Entity Dependency API).
In terms of the patch in #6 here - I've stripped it from the breaking changes, leaving only 2 small updates to
entity_uuid_delete(), which still should get committed, even though they are not really related to the issue at hand.Comment #14
igor.ro commented@maciej.zgadzaj Yes it was my mistake, I now agree with you.
Comment #16
dixon_Committed. Thanks!
Comment #17
dixon_And, marking issue accordingly.