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 we take Panels in place editor (panels_ipe) to customize to a panelized page to add some block. Following JS error happens:
ReferenceError: TWTR is not defined
.
Steps to reproduce the issue:
- Take some panelized page and click "Customize page" button to customize that page.
- Click on "+" button in any of region.
- On panels popup click on "Blocks" section.
- Click on twitter widget block link to see the preview. JS console will have above error and it will prevent adding any blocks thereafter."
Comment | File | Size | Author |
---|---|---|---|
#6 | Screen Shot 2017-05-18 at 3.11.02 PM.png | 77.19 KB | kyletaylored |
#2 | fix_TWTR_not_defined_JS_error-2555339-1.patch | 2.72 KB | junaidpv |
Comments
Comment #2
junaidpvThe issue happens when Twitter widget block is delivered via Ajax. Remote script 'http://widgets.twimg.com/j/2/widget.js' get fetched asynchronously and the inline script depending on that remote script is executed immediately.
Here is the patch fixing that issue utilizing
jQuery.getScript()
.Comment #3
junaidpvComment #4
kyletaylored CreditAttribution: kyletaylored at LevelTen Interactive commentedThat patch failed, but I think I see what you're getting at. I'll re-roll it really quick to test.
Comment #6
kyletaylored CreditAttribution: kyletaylored at LevelTen Interactive commentedWell, it worked, except the API is deprecated.