Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Oct 2013 at 17:31 UTC
Updated:
29 Jul 2014 at 23:02 UTC
Jump to comment: Most recent
Comments
Comment #1
tim.plunkettDespite the large looking patch, this just adds !entity_load() checks, and indents a bunch :)
Comment #2
webchickSeems reasonable.
Committed and pushed to 8.x. Thanks!
Comment #3
webchick.
Comment #4
tstoecklerMaybe this is a stupid question, but can someone explain why this happens with a little bit more detail? I checked and user_user_role_delete() deletes the actions properly, that were created in user_user_role_insert(). So it seems hook_user_role_insert() is being fired on roles that are already in the system during config import?! That seems very strange. I'm not so much worried about these two if-checks, but it seems if this is something that happens for all config entities, it could totally trip up a bunch of contrib and custom modules out there. In general I would expect the hook_*_insert(), hook_*_delete() combo (with hook_*_update() optionally) to do the trick.
Thanks!
Comment #5
chx commentedWhen you import a new role , the action gets created and then the action tries to be imported and sync gives up because action already exists with a different UUID...
Comment #6
tstoecklerAhh, that totally makes sense, thanks!
So this hits anyone with a "if config entity A is created, create config entity B" business logic, I guess. Don't really know what to do about that, though. I don't know we could write some sort of meta-generic cmi import tests... Hmm...
Anyway, thanks for the explanation!
Comment #7
chx commentedNote: I was slightly wrong order (but not effect) wise, the action entity gets imported first, then the role gets imported which tries to re-save a completely new action entity with the same id.
Comment #8
alexpottJust noting that #2069373: Race conditions on import if CUD on ConfigEntity A triggers changes in ConfigEntity B is related