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.
I have installed CDN and enabled testing mode. I have tried to enter in CDN mappings (following the format in the examples), but when I save the changes, the box reappears empty of contents.
When viewing a page with statistics it rewrites urls (eg for js file) as public://js/js_FAgG1QoHfodc-iiyR7z_iEiqlOHUng99sHApFws7LFw.js but is not serving them from the cdn.
Am I doing something wrong?
Comments
Comment #1
studio-days CreditAttribution: studio-days commentedI'm having this exact same issue and it's driving me mad. It works on my staging server no problem. But it doesn't work on my production server, with identical modules etc.
Any setting I change under DETAILS and OTHER tabs don't save, rather they just reset. The table 'variables' isn't getting updated in the database. I can't work it out :(
Any ideas?
cheers
Comment #2
studio-days CreditAttribution: studio-days commentedThis could be unrelated - but messing about with this module, clicking Save Configuration again and again, triggers my server firewall as well.
Related?
Comment #3
studio-days CreditAttribution: studio-days commentedI worked around my problem by setting it all up on my staging server, then exported the lines prefixed cdn_ from the *variables table in the database, then imported them into the production server database. This got it all working.
I still can't change the settings via the interface on the production server, other than switching from Disabled to Enabled, but luckily I'll never really have to.
The problem itself remains a mystery!
Comment #4
alexharries CreditAttribution: alexharries commentedSadly, I'm seeing the same problem - no trouble saving the mappings on a local instance of Openatrium, but on my live site (Greengeeks hosting), the variable is never set at all - a "drush vget cdn_basic_mapping_https" returns "No matching variable found."
Thankfully, I can work around it by issuing the following commands:
drush vset cdn_basic_mapping http://xxx.cloudfront.net
drush vset cdn_https_support 1
drush vset cdn_basic_mapping_https https://xxx.cloudfront.net
Interestingly, the first page's settings save fine.
I don't have any time to debug this further right now unfortunately - very sorry :(
Alex
Comment #5
Wim LeersI'm pretty sure you're seeing Page Cache or some other response caching thing going on. Which makes it look like mappings aren't saving. But mappings surely are saving, they just don't have an immediate effect because some pages are cached.
:O WTF?!
This must be some other module/environment issue. The CDN module uses standard settings forms. So if you're seeing it for the CDN module, you should see it for other standard settings forms too.