Multiple loads of SDK

Created on 21 July 2020, about 4 years ago
Updated 11 July 2023, about 1 year 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.

Production build 0.71.5 2024