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.
1) Add a field in "Article" content type called field_test.
2) In admin/config/people/accounts/fields that field doesn't appear (although if you try to manually add it, an error is given).
Comment | File | Size | Author |
---|---|---|---|
#10 | 626664-field_ui_add_existing_field-10.patch | 3.75 KB | yched |
#8 | 626664-field_ui_add_existing_field-7.patch | 3.3 KB | yched |
#6 | 626664-field_ui_add_existing_field-7.patch | 3.3 KB | yched |
#4 | 626664-field_ui_add_existing_field-5.patch | 3.31 KB | yched |
#3 | 626664-field_ui_add_existing_field-3.patch | 2.97 KB | amitaibu |
Comments
Comment #1
amitaibuI see in the code that
$existing_field_options = field_ui_existing_field_options($obj_type, $bundle);
so maybe this is by design? I think it shouldn't take the obj_type in account, and show *all* existing fields.Comment #2
yched CreditAttribution: yched commentedfield_ui_existing_field_options() rightfully receives $obj_type, it's rather that internally it should examine all field instances, not just field instances for the current entity type.
Comment #3
amitaibuAdded a test to yched's patch. I get a PDOException error on any tests on my local, so I'm not sure if the test pass.
Comment #4
yched CreditAttribution: yched commentedYou're right, this deserves a test, thanks for this.
Attached patch moves the test at then end of the 'add new field' workflow test, removes a double parenthesis error, and uses a more accurate assert.
Test failures : yes, core is currently broken : #626866: Test bot broken - and #623992: Reduce {system} database hits
Comment #5
amitaibuminor:
should be
e.g.
Comment #6
yched CreditAttribution: yched commentedOopsie :-)
Comment #8
yched CreditAttribution: yched commentedRe test please.
Comment #10
yched CreditAttribution: yched commentedDoh, wrong boolean logic...
Comment #11
amitaibuTests pass, and functionality is fixed as-well.
Comment #12
webchickCommitted to HEAD.