Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Jul 2013 at 01:03 UTC
Updated:
29 Jul 2014 at 22:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
effulgentsia commentedTagging WSCCI because it results in the HAL output for a node missing the UUID of the author if the author is the root user.
Comment #2
Vasiliy Grotov commentedWill work on this on the weekend.
Comment #3
Vasiliy Grotov commentedThe problem was there is no data provided for UUID by the user.install.
Tested on local - works fine. Let's see what Test bot will say.
Comment #4
berdirThis should use the uuid service.
And it's quite crazy that this doesn't use the storage controller...
Comment #5
yched commented#2092603: Users 0 and 1 have no UUID was marked duplicate.
#2090541: Avoid storing numeric target_id's for default values in field instance CMI files is hitting this.
Comment #6
dawehnerThe uuid is not a service yet.
I agree, maybe some problems with order of bootstrapping in the installer or just some historical reasons.
It would be cool to have a test.
Comment #7
anavarre3: drupal8-users-0-and-1-are-created-without-a-uuid-2050843.patch queued for re-testing.
Comment #9
webchickPer anavarre, this is apparently preventing POST requests in REST so seems at least major...
Comment #10
anavarreWell, posting as anon always: #2113681: Node author can't be set when posting via HAL
Comment #11
sun#2158581: uid 1 is created without uuid was marked as duplicate.
Comment #12
sunAttached patch should fix the bug. Still needs two test assertions somewhere. Ideally in an existing installer-specific test.
Comment #14
berdirThe UUID generator is a service now.
Comment #15
luketarplin commented@Berdir You jumped me was just about to release a patch for this using the Drupal::Service method. Just a point you don't need the additional use Drupal\Component\Uuid\Uuid declaration at the top as you are using the Uuid through a Drupal Service not directly! Also it may be better to declare a $uuid = \Drupal::service('uuid'); variable at the top of the install hook and then just use $uuid->generate() instead of making 2 calls to the Drupal Service to get UUID when it is needed.
Comment #16
berdir@luketarplin: Sorry :)
Yes, I based my patch on sun's and forgot the remove the use. Feel free to upload your patch :)
Comment #17
berdirRemoved the unecessary use.
Comment #18
sunThanks!
You removed another unnecessary Field use statement there but not the Uuid use statement. However, in general, we should not care for such stuff right now. AFAIK, IDEs like phpStorm are able to perform such a clean-up automatically, across all files. Therefore, we should perform such a clean-up just simply once right before release, instead of holding up patches for it.
Re-uploading the identical patch sans the first hunk in user.install to avoid further delays → RTBC.
Comment #19
anavarreWorks as expected now, thanks!
Hopefully this will unblock #1979260: Automatically populate the author default value with the current user and #2113681: Node author can't be set when posting via HAL
Comment #20
webchickGreat catch.
Committed and pushed to 8.x. Thanks!