Multiple loads of SDK

Created on 21 July 2020, almost 5 years ago
Updated 11 July 2023, almost 2 years ago

I have the code for FB MCC loading 26 times on a live page.

Looking at the JS code, there is no attempt to prevent multiple loading - even though it's called for every BigPipe and Ajax load.

This patch fixes that, and makes better use of jQuery's prepend code.

🐛 Bug report
Status

RTBC

Version

1.4

Component

Code

Created by

🇬🇧United Kingdom adaddinsane

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada johnjw59@gmail.com

    We should probably be making use of Drupal's jquery.once library for this as that's the more standard solution. Here's accomplishing the same goal, but using jquery.once instead of a custom class solution.

    No interdiff is provided as this is a new patch with no relation to the first.

  • 🇨🇦Canada lil.destro

    Updated patch #5 to reflect changes to once in core.

Production build 0.71.5 2024