Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
configuration system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Apr 2013 at 17:36 UTC
Updated:
29 Jul 2014 at 22:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
andypostTaggin
Comment #2
larowlanTagging
Comment #3
yched commentedHmm.
According to ConfigEntityBase, isnew() is FALSE the moment the $config_entity has a non empty id.
(or between entity_create() and save(), when enforceIsNew is TRUE)
That seems wrong to me ?
Entity does :
That seems very much tied to a pre-D8 model where "a $node is considered new before it got saved and received a serial id in the process".
If so, I'd say the equivalent of this for ConfigEntities is the presence of a UUID, not an id, because ConfigEntities will always have an id (a machine name) ?
Bumping to the config system for feedback.
Comment #4
andypostIt was introduced in #1813832: Entity wrongly checks existence of ID in isNew() method
Comment #5
yched commentedDiscussed this with @Berdir and @fago.
ConfigStorageController::create() calls $entity->enforceIsNew() already.
ConfigEntityBase::isNew() should be based only on the enforceIsNew flag.
Comment #7
tim.plunkett#5: config_entity-isNew-1970110-5.patch queued for re-testing.
Comment #8
berdirMakes sense, checking Id for config entities has no meaning as it's always manually assigned.
Comment #9
dries commentedCommitted to 8.x. Thanks.