When javascript aggregation is on and allow_url_fopen=off widget can't retrieve the JavaScript.

Warning: file_get_contents(http://www.jzuyderduyn.nl/sites/default/files/twitter_block/widgets.js) [function.file-get-contents]: failed to open stream: Connection refused in _locale_parse_js_file() (regel 1488 van /home/vhosts/jzuyderduyn.nl/httpdocs/includes/locale.inc).

Instead we should simply use drupal_add_js('http://platform.twitter.com/widgets.js', 'external');

Comments

GoofyX’s picture

GoofyX’s picture

After creating my issue (Feed not fetched with JS aggregation enabled in Drupal performance settings) I realized that I have the same error in my log, so my issue is surely linked to this one.

gagarine’s picture

Title: Warning: file_get_contents » does not work with js aggregation enabled and allow_url_fopen=off
Issue summary: View changes
Related issues: +#1824462: Brightcove module does not work with js aggregation enabled
naveenvalecha’s picture

Version: 7.x-2.2 » 7.x-2.x-dev
Assigned: Kobusking » Unassigned
Issue tags: -twitter_block file_get_contents locale.inc +Novice
naveenvalecha’s picture

Status: Active » Closed (duplicate)
Issue tags: -Novice