For a contrib, i have created an entity and a bundle with their types. Data is stored in own tables, so basically i only want to manage the display of fields. This all works nicely, doing the entity stuff in preprocessor, view and build_content functions.
I have three fields, only set for display in hook_field_extra_fields. None of them are showing in the Fields display UI. However, as soon as i create a custom field (which is stupid in my case, since data is created by code and not by user input), i see four fields which i can drag around in the full view mode. The frontend appears like configured.

When tracking this, it always comes down to calculating the instances and the extra fields where in some cases only the empty($instances) is checked while there could be just extra fields.
Does this make sense?

CommentFileSizeAuthor
#2 field_ui.admin_.inc_.patch791 bytesStalski
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Stalski’s picture

Priority: Normal » Critical

Weirdly enough the only thing that is needed is the change on line 828 in fields_ui.admin.inc:

  if (empty($instances) && empty($extra_fields)) {
    drupal_set_message(t('There are no fields yet added. You can add new fields on the <a href="@link">Manage fields</a> page.', array('@link' => url($admin_path . '/fields'))), 'warning');
    return $form;
  }

As the fields manage display system is currently unusable with extra fields only, i will make this a critical. I am testing this further to see if it has any implications on the rest, but that's very unlikely.

- EDIT -

Stalski’s picture

FileSize
791 bytes

The patch for it.

yched’s picture

Priority: Critical » Normal
Status: Active » Reviewed & tested by the community

Makes sense. Does not qualify as critical, though, D7 is not "unusable" without the fix.

swentel’s picture

Bumping! This is really necesssary :(

swentel’s picture

Version: 7.0-beta1 » 7.x-dev

Moving to dev and getting this some attention.

Stalski’s picture

Bumping this. Weird, i don't work on too many contribs but the ones i work on all need this patch: heartbeat, display suite and field_group :)

yched’s picture

Priority: Normal » Major

yes, bumping as 'major' - The Field UI screens host features not specific to Fields.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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