- Issue created by @mortim07
- Status changed to Needs review
about 1 year ago 12:08pm 30 October 2023 - last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago Patch Failed to Apply - Issue was unassigned.
- Status changed to Needs work
12 months ago 8:19am 12 January 2024 - πΈπ°Slovakia kaszarobert
2 things need to be checked:
1. In
media_entity_facebook_library_info_build()
:
+ $language_id = \Drupal::languageManager()->getCurrentLanguage()->getId() ?? 'en_US';
We cannot really use this as FB SDK's langcodes differ from Drupal's. The proper langcode-map is already there in FacebookFetcher $langcodes array. That array needs to be refactored to a service that contains one public method
getFacebookSdkLangcodeByDrupalLangcode($drupalLangcode)
and that should be called in this hook.2. Also, in the patch does this library load for every single page? It should load only if a Facebook media is rendered.
Also, note for myself: if we change the way how we attach libraries, then the Facebook cookie consent module we made β also needs a new way of blocking the FB SDK script.
- π¦πΊAustralia mortim07
@kaszarobert Thanks for looking at the patch.
In regards to point 2. It only loads when the template media-entity-facebook is rendered and is_frame is FALSE.
I'll take a look at the language mapping and make the necessary changes.
- π¦πΊAustralia mortim07
@kaszarobert Sorry for the delay in getting this done.
- Status changed to Needs review
10 months ago 2:40am 28 February 2024