Closed (fixed)
Project:
Dynamic Entity Reference
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2015 at 08:21 UTC
Updated:
25 Oct 2015 at 10:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
larowlanFixes for this and for the removed NEW_ENTITY_MARKER.
Tests all green locally.
Comment #4
yched commentedYeah, kind of ugly :-)
The thing is, several e_r code in Core assume all ER fields have a Selection handler - DER bypasses the notion of "selection handler" completely ? How does it handle "what is referenceable and what is not" ?
Also, on that regard, maybe you guys would have a thing to say about the validation strategy considered in #2577963: Let entity_ref Selection handlers be in charge of the field validation (since it proposes to rely more heavily on the Selection handlers in the ValidReference constraint) ?
Comment #5
jibranWe store the same settings as ER but keyed by entity type.
Something like
We don't use
ValidReferenceconstraint we haveValidDynamicReferenceconstraint.@larowlan I committed the patch but head still has some fails. :(
Comment #6
yched commentedI see, makes sense.
Still, the fact that the 'handler' setting expected from the parent is not present, is a bit worrying. Could it be left present but set to NULL ?
Comment #7
larowlanEven null would fail, field module expects a particular format.
I will file a core issue. The guts of the problem is field item classes need a way to validate their settings in a configurable instance, I think field module knows too much about the nuances of an er item and the solution is to invert it. On leave for a few days, but will paste link here once I have something going.
Comment #8
larowlanJibran, fails are because head has moved again I think
Comment #9
larowlanYep http://cgit.drupalcode.org/drupal/diff/core/lib/Drupal/Core/Field/Plugin... wasn't in the version of HEAD it was passing on. New issue i think.
Comment #10
larowlan#2582631: Implement FieldItemInterface::calculateStorageDependencies, overriding that in EntityReferenceItem for the new fails
Comment #11
larowlanAlso @jibran http://cgit.drupalcode.org/dynamic_entity_reference/tree/src/dynamic_ent... isn't what was in https://www.drupal.org/files/issues/fix-HEAD.patch - somehow the .module file ended up in /src folder.
Fixed and pushed that, should be back to green.
Comment #14
jibranComment #15
jibranComment #16
jibranWe need a core followup for #7 and perhaps DER followup for #1978714: Entity reference doesn't update its field settings when referenced entity bundles are deleted.