The ListItemProcessor plugin only displays labels for fields added via field.module, e.g. fields that are stored as config entities.

I've patched this plugin to also query the base field definitions.

Currently it only looks up fields on the entity without a bundle.

Haven't added a test yet, either!

I'm looking for feedback to see if this is the right way to do it, or not.

Comments

bc created an issue. See original summary.

bc’s picture

borisson_’s picture

Status: Active » Needs review

Thanks for the bug report and that patch, I think this is the right way to do it. I'd love to get a test in for this as well. Setting this to Needs Review for the testbot.

bc’s picture

Cool, I'll work on the test.

Currently this class is covered by tests/src/Unit/Plugin/processor/LimitItemProcessorTest.php -- should it be called ListItemProcessorTest instead?

Status: Needs review » Needs work

The last submitted patch, 2: facets-listitemlabelforentityfields-2709515-1-8.patch, failed testing.

The last submitted patch, 2: facets-listitemlabelforentityfields-2709515-1-8.patch, failed testing.

borisson_’s picture

Yes, that class should be renamed, great catch.

bc’s picture

bc’s picture

Status: Needs work » Needs review
bc’s picture

This might not handle the case of an entity having additional base properties on a certain bundle.. if that's a thing?

borisson_’s picture

@bc: I don't think that's a thing.

Attached are some docs changes, will commit this later this week.

bc’s picture

Cool, thanks for the style fixes; i don't know why i camelcased there :)

borisson_’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the issue as well as the fix, committed.

  • borisson_ committed 262fe2e on 8.x-1.x authored by bc
    Issue #2709515 by bc, borisson_: Display labels for entity base fields...

Status: Fixed » Closed (fixed)

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