JSONAPI Extras module allows selecting a field enhancer for "fields" (attributes) of config entities in the admin UI. It, however, does not apply any field enhancer to config entities because config entities have no concept of fields.

This patch is to iterate over the exported attributes of config entities and apply the configured enhancers.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sonnykt created an issue. See original summary.

sonnykt’s picture

Status: Active » Needs review

Status: Needs review » Needs work
sonnykt’s picture

Status: Needs work » Needs review
e0ipso’s picture

Status: Needs review » Needs work

This is looking good. We need the other half as well. This is when we transform data coming in so it matches the internal format. This should use the doTransform(…) method.

Thanks for reporting and for providing a working patch!

e0ipso’s picture

@sonnykt do you think you'll get a chance to look into this again?

sonnykt’s picture

@e0ipso sorry I was busy these days. I'll try to submit another patch in next few days.

sonnykt’s picture

New patch to apply enhancer on incoming data.

sonnykt’s picture

Status: Needs work » Needs review

  • e0ipso committed f67e2ad on 8.x-2.x authored by sonnykt
    Issue #2975925 by sonnykt, e0ipso: Field enhancer does not work with...
e0ipso’s picture

Priority: Normal » Critical

Thanks for the fix @sonnykt! This was a very good catch.

e0ipso’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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