Closed (fixed)
Project:
Entity Reference Revisions
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2017 at 14:05 UTC
Updated:
29 Aug 2017 at 13:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hchonovComment #3
hchonovComment #4
hchonovOups no need to duplicate the logic..
Comment #5
hchonovOuups got the wrong patch uploaded ...
Re-uploading the previous again here...
Comment #6
miro_dietikerInteresting discovery. Why is core unserialization not required to be type safe?
Is this nothing that should be addressed there?
I know we have similar type change problems via form state serialization/unserialize...
Does this affect a current use case too?
Comment #7
hchonovActually it is not the unserialization the problem it is just how I've came across the problem in the issue referenced in the IS.
I've opened a core ticket about the real problem - #2851149: Exceptions on setting entity reference field with integer target ID and entity object.
Comment #8
berdirYes, this is a standard problem, entity values are *not* type safe, like anything else coming from the database, and type safe checks don't work.
Comment #9
hchonov#2851149: Exceptions on setting entity reference field with integer target ID and entity object has been committed, so I guess it is time to do the change here as well?
Comment #10
berdirYes, we've actually seen this fail on a paragraphs test. I guess this if fine to commit without explicit test coverage, but if we want, we could port the core tests, should be fairly easy.
Comment #12
miro_dietikerCommitted, thx. :-)