When you are adding fields for an index it shows the following:
https://www.evernote.com/shard/s44/sh/b6793603-b2da-4d8f-81c8-66ecb7e536...

* Authored by » @label ID

It should be clear that this is just the identifier and that this is not the content. This could be confusing for folks so we need to guide them to the bottom of the page where they can add "related fields".

Comments

nick_vh’s picture

Issue tags: +Novice
nick_vh’s picture

Issue tags: +drupaldevdays
m1r1k’s picture

Status: Active » Needs review
StatusFileSize
new1.64 KB
nick_vh’s picture

Status: Needs review » Needs work
  1. +++ b/src/Entity/Index.php
    @@ -684,11 +684,14 @@ class Index extends ConfigEntityBase implements IndexInterface {
    +        if ($property instanceof FieldItemDataDefinition && in_array($property->getDataType(), array('field_item:entity_reference', 'field_item:image', 'field_item:file'))) {
    

    will this ever give us issues when trying to extract metadata from images or files?

  2. +++ b/src/Entity/Index.php
    @@ -736,7 +739,12 @@ class Index extends ConfigEntityBase implements IndexInterface {
    +            $nested_label = str_replace('@label', $referenced_entity_type_label, $nested_label);
    

    I hope this is a safe way of doing this. Can't we utilize the t() function for this?

    t($referenced_entity_type_label, array('@label' => $nested_label));

m1r1k’s picture

Status: Needs work » Needs review
StatusFileSize
new614 bytes
new1.63 KB

1) Nope, because metadata is stored as separate DataProperties (at least now) and if I will enable Image as additional field all metadata will be in the list

2) Fixed

nick_vh’s picture

Status: Needs review » Reviewed & tested by the community

Looks good

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Looks very good, thanks!
Committed.

  • drunken monkey committed bd970c3 on 8.x-1.x authored by m1r1k
    Issue #2470958 by m1r1k: Fixed Fields UI showing "@label ID" instead of...

Status: Fixed » Closed (fixed)

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