Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
serialization.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2014 at 15:02 UTC
Updated:
22 Jan 2015 at 20:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerAgreed with the issue itself. Let's just ensure that we have test coverage for that in the future.
Comment #2
tim.plunkettFor ConfigEntities, '' and NULL are not valid IDs. 0 and '0' are valid.
I can't speak for ContentEntities
Comment #3
arla commentedYeah, some tests would be needed to prove the issue. Until then, here's the suggested fix in code. I guess it will pass, because afaik no tests care about this yet.
Comment #4
arla commentedThis should motivate the fix in ChainEntityResolver. It's my first go with PHPUnit :)
Btw, @Berdir suggested that TargetIdResolver should actually check if the referenced entity exists. Not sure if this issue is the proper place to do that, maybe if we broaden the scope/title a bit.
Also adding a related issue where we want to be able to use, and serialize, 0 for target_id.
Comment #8
Anushka-mp commentedComment #9
Anushka-mp commentedComment #10
larowlanLooks good to me, completed the beta eval template too
Comment #12
alexpottNice find. I wondering if we should expand coverage of testing entity ids of 0 or '0' since this might not be the only place we have problems.
This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed adb97da and pushed to 8.0.x. Thanks!
Comment #14
berdirYeah, we do: https://github.com/larowlan/default_content/issues/33