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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

I 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.

yched’s picture

Status: Active » Needs review
FileSize
2.2 KB

field_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.

amitaibu’s picture

Added 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.

yched’s picture

You'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

amitaibu’s picture

minor:

+    // different entity types; .g. if a field was added in a node entity, it

should be e.g.

yched’s picture

Oopsie :-)

Status: Needs review » Needs work

The last submitted patch failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
3.3 KB

Re test please.

Status: Needs review » Needs work

The last submitted patch failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
3.75 KB

Doh, wrong boolean logic...

amitaibu’s picture

Status: Needs review » Reviewed & tested by the community

Tests pass, and functionality is fixed as-well.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.