Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the standard profile install the function user_install_picture_field() creates the field programatically. This prevents configuration import across two standard profile installations.
Solution
Add default configuration for user_picture field.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2124619.5.patch | 9.65 KB | alexpott |
#5 | 3-5-interdiff.txt | 630 bytes | alexpott |
#3 | 2124619.3.patch | 9.31 KB | alexpott |
#3 | 1-3-interdiff.txt | 8.2 KB | alexpott |
#1 | 2124619.1.patch | 8.46 KB | alexpott |
Comments
Comment #1
alexpottComment #2
damiankloip CreditAttribution: damiankloip commentedIs there a reason this lives in it's own module rather than just the standard profile config dir?
Comment #3
alexpott@damiankloip that was for testing purposes but as @xjm pointed out this was not actually testing the standard profile anymore and the config in the test module could diverge.
This patch changes the tests to use standard profile thereby testing it.
Also more of the config can be provided as defaults.
Comment #4
larowlanClosed #2114887: Maximum nesting level when attaching comment field to User. as a duplicate of this.
Basically if you add a comment field to the user entity, and don't call user_install_picture_field(), because you don't have a compact entity display for users, the call to user_view($account, 'compact'); in template_preprocess_comment creates an infinite loop as the compact view mode attempts to render the comment thread, which attempts to render the comment, which attempts to render the user - and so on.
Comment #5
alexpott#1443606: Alt, title, width and height for default images has landed requiring a change to this.
Comment #6
alexpottRe #4 I don't think this is going to fix that issue. Comment somehow needs to take care of that itself. It should not be assuming that compact exists whilst the compact configuration is in the standard profile. I'm going to re-open the other issue.
Comment #7
alexpott5: 2124619.5.patch queued for re-testing.
Comment #8
damiankloip CreditAttribution: damiankloip commentedNice! Actual data types.
This patch looks good to me now. Everything is living in it's correct home.
Comment #9
webchickEasy-peasy.
Committed and pushed to 8.x. Thanks!