Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#48561 closed enhancement (wontfix)

Block "Facebook Embed" inserts new fb-root every time it's included on a page

Reported by: bastianfiessinger Owned by:
Priority: normal Milestone:
Component: Embeds Version:
Severity: normal Keywords:
Cc: Focuses:

Description

Every time a "Facebook" Block is included on a page, the block creates an element with the following nodes on the start:

<div id="fb-root"></div>
<script async="1" defer="1" crossorigin="anonymous" src="https://connect.facebook.net/fr_FR/sdk.js#xfbml=1&amp;version=v5.0"></script>

So there are multiple instances of id="fb-root" and the facebook sdk.js is also included multiple times if you want to display more than one Facebook post on a page.

Maybe hook in after get_header() to inlclude these nodes once as there is no ideal hook right after the body tag.

Btw: why is the sdk loaded from the french version of facebook?

Change History (3)

#1 @SergeyBiryukov
7 years ago

  • Component GeneralEmbeds

This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.


7 years ago

#3 @isabel_brison
7 years ago

  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

Thanks for reporting this! We will try to contact Facebook to get it changed on their side, so I'm closing this ticket for now.

Note: See TracTickets for help on using tickets.