Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I'm getting This PHP errors
Warning: file_get_contents(): Unable to access //netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js in drupal_build_js_cache() (line 4940 of /hosting/www/killua.me/public/includes/common.inc).
Warning: file_get_contents(//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js): failed to open stream: No such file or directory in drupal_build_js_cache() (line 4940 of /hosting/www/killua.me/public/includes/common.inc).
Comment | File | Size | Author |
---|---|---|---|
#1 | 2031247-do-no-preprocess-js-css-cdn.patch | 2.19 KB | wiifm |
Comments
Comment #1
wiifmEncountered the same issue with CSS and JS aggregation turned on. The problem lies in the fact that you should not aggregate resources hosted on CDN's.
Attached is a patch that forces the the preprocessing to FALSE.
Bumping to major as this has serious side effects for people wishing to use this theme in a production environment.
Comment #2
markhalliwellThis isn't in the scope of this issue.
Need to add
'preprocess' => FALSE
here too.This isn't in the scope of this issue.
This isn't in the scope of this issue.
Comment #3
wiifmHey @Mark Carver, my editor automatically strips trailing whitespace, I can re-roll a patch if you want or you can
git add -p
to commit only the parts of the patch you like after applying.As for drupal_js_defaults() this indeed defaults to
'preprocess' => TRUE,
but if you read drupal_add_js() it mentions if type is external "These files will not be aggregated if JavaScript aggregation is enabled".This is a snippet from the head section of my site with this patch (and CSS and JS aggregation enabled):
Potentially there could be a comment above the code to indicate that the external JS is not aggregated.
Comment #4
markhalliwellNo, this is fine for now. I just forgot it does it that. This will all get refactored anyway once I backport some of the D8 improvements to the logic. Normally I don't like committing whitespace issues in the same patch is all, but I also hate when maintainers do what I just did, sorry lol
Fixed in commit: 020f5ed.
Comment #5
wiifmThanks for the attribution, and your hardwork with this theme.
Comment #7
Namero CreditAttribution: Namero commentedHello,
i am having the same error message, can i use the patch created by "wiifm" or it need the revisions by "Mark Carver"?