No output from formatter after upgrade to 4.x (using oEmbed API)

Created on 12 September 2023, over 1 year ago
Updated 18 September 2023, over 1 year ago

Thanks to @kaszarobert for breathing new life into this module!

Problem/Motivation

After upgrading 3.0.0-beta2 => 4.0.1, I couldn't get any output at all from the Facebook embed formatter. I am using oEmbed API. The field template was outputting wrapper mark-up, but it was empty.

I did manage to track down the issue; see below. I will add a patch shortly.

Steps to reproduce

NA

Proposed resolution

Fix typo in theme name in getOembedData(): entity_media_facebook should be media_entity_facebook.

The above fix meant I could get output, but the HTML tags were escaped. I fixed this by outputting {{ url|raw }} in the template.

Remaining tasks

NA

User interface changes

NA

API changes

NA

Data model changes

NA

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada othermachines Edmonton, Alberta

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @othermachines
  • Status changed to Needs review over 1 year ago
  • πŸ‡¨πŸ‡¦Canada othermachines Edmonton, Alberta

    Here's a patch.

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    I committed your patch. If you really have access to the oEmbed API, then could you please help me out testing another functionality that is connected to this module: πŸ“Œ Check if it still works when rendering post with Facebook Oembed API Postponed: needs info All we need is to know is what exactly is returned from the oEmbed API and rendered with the field. If you could open a webpage with a Facebook media and right click See source (CTRL + U) and paste the field's HTML to that issue, so we'd be really thankful if you could help us out there.
    Neither me or my collegues could get the permission from Facebook to use oEmbed API. I just don't understand why they are rejecting us and not enabling these for development.

  • πŸ‡¨πŸ‡¦Canada othermachines Edmonton, Alberta

    Thanks for the commit!

    I'll certainly test if I can. Our set-up is a bit unusual in that the embeds generated by this module are rendered only for admins/authorized users (it is a decoupled site). I'll try to have a look in the next week or so.

    I did a lot of research (mostly reading about others' experiences) and took copious notes before and during the application submission process, which was approved within minutes, so if you're still aiming for app approval I may be able to help.

  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    I understand. I tried to apply twice with an existing news site as they use Facebook embeds from politicians and social groups for referencing source material. We went through business verification but they declined both of our requests for oembed with no clear explanation after weeks. All we need to see is what response or raw HTML comes through the oEmbed API exactly when it is working (does it include a script tag with SDK, iframe etc.). After that we can mock the oembed service, write tests for it etc.

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

Production build 0.71.5 2024