Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When loading the page a warning appears in the browser's console:
"Invalid App Id: Must be a number or numeric string representing the application id."
This is because this code from fb_likebox.js:
js.src = "//connect.facebook.net/en_EN/sdk.js#xfbml=1&version=v2.3";
The recommended code from Facebook is:
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=NNNNNNNNNNNNN";
The plugin still loads.
Comment | File | Size | Author |
---|---|---|---|
#9 | fb_likebox-invalid_app_id-2499463-9.patch | 7.32 KB | mfernea |
Comments
Comment #1
mfernea CreditAttribution: mfernea at AmeXio commentedComment #3
baekelandt CreditAttribution: baekelandt as a volunteer commentedComment #5
mfernea CreditAttribution: mfernea at AmeXio commentedI think it would be best if the AppID is configurable.
Comment #6
baekelandt CreditAttribution: baekelandt as a volunteer commentedThe App Id is set in the js-file, so I don't know how I can make that accessible through the drupal block configuration structure.
It's the same reason why you can't specify the Page plugin's language in the block configuration, so it's always in English unless you decide to override it.
If somebody has an idea on how to do this, let me know (and if you can maybe provide me with a patch).
Comment #7
mfernea CreditAttribution: mfernea at AmeXio commentedOne solution would be to make the js file use Drupal.settings for that.
This might be a good inspiration: https://www.drupal.org/node/304258
I'll try to find time to create a patch.
Comment #8
mfernea CreditAttribution: mfernea at AmeXio commentedHere is the patch.
Comment #9
mfernea CreditAttribution: mfernea at AmeXio commentedI left a console.log in the patch from #8. Here is the correct version.
Comment #11
baekelandt CreditAttribution: baekelandt as a volunteer commented@mfernea thanks for creating a patch and helping to make the most of this module.
Comment #12
baekelandt CreditAttribution: baekelandt as a volunteer commentedComment #13
mfernea CreditAttribution: mfernea at AmeXio commentedCheers! ;)