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.
It seems that there is an issue when having fastly plugin and CDN module installed.
When I save a node - I get an error 500.
I haven't been able to verify which part is the culprit - just that disabling CDN solved the issue.
Comment | File | Size | Author |
---|---|---|---|
#5 | Screen Shot 2016-06-01 at 10.52.29.png | 161.82 KB | jonasdk |
Comments
Comment #2
jonasdk CreditAttribution: jonasdk as a volunteer commentedComment #3
jonasdk CreditAttribution: jonasdk as a volunteer commentedComment #4
Wim LeersDo you see errors in your PHP error log?
Comment #5
jonasdk CreditAttribution: jonasdk as a volunteer commentedI get following errors when trying to access a node that have an image in it - times 3 from 3 different IPs (all Fastly IPs)
InvalidArgumentException: The URI '//d3ocrpywcc4gay.cloudfront.net/sites/default/files/hero/2016-04/autohjaelp_trailer.jpg' is invalid. You must use a valid URI scheme. i Drupal\Core\Url::fromUri() (linje 276 af /var/www/html/core/lib/Drupal/Core/Url.php).
And I get these messages from the fastly module also in recent reports:
Successfully purged the key config:cdn.settings. Purge ID: 296-xxxxx-xxxxx.
In the screenshot you see the logs filed when I did a Activated of the preconfigured CDN module and after the 500's deactivated CDN in the settings again both on the Status tab in CDN module UI.
Comment #6
jonasdk CreditAttribution: jonasdk as a volunteer commentedYou might also need to know that the way we have the sites set op is like this:
subdomain.prod.domain.dk (The drupal server)
subdomain.domain.dk (fastly)
The Drupal server is only accessible from fastlys servers.
Comment #7
Wim LeersThanks! Now I can do a targeted investigation :) Stay tuned!
Comment #8
Wim LeersComment #9
Wim LeersYour screenshot suggests you're actually using the
purge
module. Is it possible that that's what you're seeing this error with?In any case, the specific error message you're seeing is because Drupal 8's
Url
class currently does not support protocol-relative URLs. That's being fixed in #2573635: Url::fromUri() should accept protocol-relative URLs.I suspect Purge or a plugin for it is calling
file_create_url()
when it should notComment #10
jonasdk CreditAttribution: jonasdk as a volunteer commentedI don't have the purge module installed.
This is my make file
Comment #11
Wim LeersOh, hm, you're right. Those log entries in your screenshot indeed originate from the Fastly module. Let me look into this a bit more.
Comment #12
Wim LeersAre you uploading a file in that case? The more I think about this, the more it looks like this is a duplicate of #2711529: File upload widget broken when using CDN module, fixed in Drupal 8.1.4: require that version.
Comment #13
jonasdk CreditAttribution: jonasdk as a volunteer commentedI am not saving a new file with it.
Just going to a node with a image and then trying to save it.
Comment #14
Wim LeersThat's effectively the same thing :) Thanks for confirming. See that other issue for details.
Comment #15
Wim Leers