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:

  1. Take some panelized page and click "Customize page" button to customize that page.
  2. Click on "+" button in any of region.
  3. On panels popup click on "Blocks" section.
  4. Click on twitter widget block link to see the preview. JS console will have above error and it will prevent adding any blocks thereafter."
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

junaidpv created an issue. See original summary.

junaidpv’s picture

Status: Active » Needs review
FileSize
2.72 KB

The 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().

junaidpv’s picture

Assigned: junaidpv » Unassigned
kyletaylored’s picture

That patch failed, but I think I see what you're getting at. I'll re-roll it really quick to test.

  • kyletaylored committed 5816949 on 7.x-1.x authored by junaidpv
    Issue #2555339 by junaidpv, kyletaylored: "ReferenceError: TWTR is not...
kyletaylored’s picture

Status: Needs review » Fixed
FileSize
77.19 KB

Well, it worked, except the API is deprecated.

"Twitter v1 API deprecated" notice

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.