Problem/Motivation

When you first enable the module, you still need to do some leg work to configure the fb_instant_articles view mode before you can get output that you can send to Facebook. Furthermore, only fields which are configured with an FBIA prefixed field formatter are included. There are many fields for which there is no direct equivalent Facebook element, but since fields generate HTML and the FBIA PHP SDK includes a Transformer to transform arbitrary HTML into Instant Article elements, there should be no reason why we can't support non-FBIA prefixed formatters, and therefore, non-fb_instant_articles view mode. This ease the setup burden somewhat and more clearly illustrate the purpose of the FBIA prefixed formatters.

Proposed resolution

Update the ContentEntityNormalizer to support iterating over a non-fb_instant_articles view mode.

Add support for rendering non-FBIA prefixed fields and passing them through the FBIA PHP SDK Transformer as a way to include them in the instant article.

Remaining tasks

Implementation.

User interface changes

None.

API changes

The normalizer will assume the default entity view display if none is passed in.

Data model changes

None.

Comments

m4olivei created an issue. See original summary.

m4olivei’s picture

Assigned: Unassigned » m4olivei
m4olivei’s picture

Assigned: m4olivei » Unassigned
Status: Active » Needs review
sunset_bill’s picture

Status: Needs review » Reviewed & tested by the community

Tried it out. Works as expected.

m4olivei’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Merged.

  • m4olivei committed 010d109 on 8.x-2.x
    Issue #2887794 add tests for simle default fields.
    
  • m4olivei authored 15ec341 on 8.x-2.x
    Issue #2887794 by m4olivei, sunset_bill: Use default entity view display...
  • m4olivei committed 375eb4d on 8.x-2.x
    Issue #2887794 Use default view mode when no fb_instant_articles display...
  • m4olivei committed 4d6e5f4 on 8.x-2.x
    Issue #2887794 remove @todo regarding missing a mapping at the field...
  • m4olivei committed c7a89a9 on 8.x-2.x
    Issue #2887794 take out the iteration over fields to normalize without...

Status: Fixed » Closed (fixed)

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