Was using this module without fail. Tonight after upgrading my site theme (or any other) will no longer load. When the module is turned off everything works again. Even touching to resynch items does not help

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

venusrising created an issue. See original summary.

Wim Leers’s picture

Priority: Major » Critical

Oh no :( This is definitely critical.

Wim Leers’s picture

  1. Can you describe your set-up?
  2. Are there any errors logged to watchdog?
  3. What does the status report say?
  4. Can you post a screenshot?
Wim Leers’s picture

Title: CDN UPDATE BREAKS THEME » CDN 2.7 update breaks theme!
venusrising’s picture

Hi Wim-
I don't see any error logs. I did try this with core themes and it happened with all over them. I even tried turning off clearing cache and turning back on but no luck. It for some reason just won't grab the themes, content is there and I did notice a huge list of TAP to reload on images and pages.

Wim Leers’s picture

Category: Bug report » Support request
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)
  1. You didn't post a screenshot like I asked.
  2. I updated my own site to this release, and could not reproduce the problem.

P.S.: what is "TAP"?

Wim Leers’s picture

Blau’s picture

Hello,

Sorry for the delay. I include 2 images of the home page before and after activation of CDN 2.7 module. And a third image showing that no error is detected in this module (neither in any other -not shown-).

CDN connected to Amazon. Bartik Theme and Drupal core versions: 7.42.

Blau

Wim Leers’s picture

Can you post the contents of the <head> tag?

Blau’s picture

FileSize
7.48 KB
10.75 KB

Head tags without (wo) and with (w) the CDN module activated have been attached.

Wim Leers’s picture

Thanks! I asked for that because it's clear from the screenshots no CSS is being loaded. But I can see that the URL actually looks correct:

  <link type="text/css" rel="stylesheet" href="http://d730fqtvs7q4l.cloudfront.net/cdn/farfuture/NtLR8ZaArhc5GTvtt9p9sLNCJG9WKGHk7acdy56jZrc/mtime:1455472748/sitefiles/cdn/css/http/css__eA0p6cwH2Qel5P_3i83-19fhoIqJS2I3vP6lu-9c-A.css" media="all" />

So, can you say what the contents are of those CSS responses?

Blau’s picture

No file is found!

Wim Leers’s picture

And everything worked fine with version 2.6 for you?

Blau’s picture

Yes, it did completely fine.

Wim Leers’s picture

Did you happen to change your database name or credentials at the same time?

Blau’s picture

No. Although I updated Drupal core at the same time (of updating CDN). I do not know if this change in Drupal core could have some effect.

captainack’s picture

This may be a dupe. Can you try this patch?

diff --git a/cdn.module b/cdn.module
index e2a6a17..01fb337 100644
--- a/cdn.module
+++ b/cdn.module
@@ -350,7 +350,7 @@ function cdn_menu() {
   );
 
   // Origin Pull mode's Far Future expiration support.
-  $items['cdn/farfuture/%/%/%/%menu_tail'] = array(
+  $items['cdn/farfuture/%/%/%menu_tail'] = array(
     'title'            => 'Download a far futured file',
     'access callback'  => TRUE,
     'page callback'    => 'cdn_basic_farfuture_download',
captainack’s picture

EDIT: Wrong thread :-!

Blau’s picture

Sorry, but I do not know much about code. Where should I include this patch?

captainack’s picture

Okay.

Do you have a non-production staging or development site you can test it on?

Blau’s picture

Not in the same conditions, but I will prepare it.

Blau’s picture

Done. What should I do now to include the patch?

captainack’s picture

Great! You probably already know this, but make sure the cdn module isn't shared with your production site - like if the cdn module is in the /sites/all/modules that's shared with the production site, don't do it

After that... There are good instructions here on how to apply a patch: https://www.drupal.org/patch/apply

muldrow’s picture

I can confirm the exact same situation: CDN working great on 2.6, then breaking with 2.7.

Some further symptoms:
With far future set to on, everything breaks. It looks like all of the files return 403 errors when they are pulled.

With far future set to off, I'm unable to load new images into content because the style/thumbnails are generating into files that return 403 errors as well.

Cache clearing and monkeying with aggregation of files doesn't help at all. Reverting to 2.6 fixes everything back to normal.

I tried the patch above, but it didn't help.

Oleksiy’s picture

Got the same issue with files when updated CDN module to 2.7.
@captainack, thanks for the patch, it solves the issue for me.
Above the patch file is attached.

captainack’s picture

Status: Postponed (maintainer needs more info) » Needs review

Thanks for confirming it Oleksiy!

muldrow ... Can you please confirm that you applied the patch correctly and confirm that this is indeed already covered? Were you able to pull the files by going to the farfuture path on your site directly?

Blau, did you have any luck with the patch?

Blau’s picture

Sorry! I tried to apply the patch, but I could not understand how to do that. If I am right I should access my server by SSH, isn't it? Is there another option, e.g. by Devel, or whatever different system?

venusrising’s picture

Sorry for omitting the screenshot as I had corrected it with a rollback before I could grab it. Wim when I said to TAP there is text using Amazon that says to tap to re-load files ie if there has been a change etc. So even reloading the content did not help. Sorry for the delayed reply.

I don't have a test site available right now.

muldrow’s picture

I can confirm that the patch resolves these issues. Thanks!

fgm’s picture

Had the same problem with Cloudfront when I upgraded to 7.43 and CDN 2.7. Applying the patch in #17 fixed the issue.

In my case I noticed it initially with the RSS feed icon, which got fetched from

http://osinet-cdn.osinet.eu/cdn/farfuture/eDyaLh9tnVQBqPfpUOgAnvGBDdmkvv...

... which translates to cdn/farfuture/%(for token)/%(for tag)/(path)

but the hook_menu() entry expects cdn/farfuture/%(for token)/%(for drupal_release)/%(for something else)/(path)

Removing the extra % addresses the issue, but maybe it breaks something else ?

Wim Leers’s picture

Title: CDN 2.7 update breaks theme! » Follow-up for #2647830: CDN 2.7 update breaks theme!
Category: Support request » Bug report
Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community
Related issues: +#2647830: farfuture, SEO, and "domain uses the same web server as this Drupal site" error message

Damn — sorry folks :(

This was broken in #2647830: farfuture, SEO, and "domain uses the same web server as this Drupal site" error message. @captainack also reported this over at #2647830-18: farfuture, SEO, and "domain uses the same web server as this Drupal site" error message. This slipped through the manual testing he did back then. Thanks for all the confirmations that this fixes the problem. RTBC'ing.

Wim Leers’s picture

Title: Follow-up for #2647830: CDN 2.7 update breaks theme! » Follow-up for #2647830: version 2.7 broke Far Future expiration

Better title.

Wim Leers’s picture

And this is why having comprehensive test coverage is so important :( We have CDNOriginPullFarFutureTestCase, but no integration test coverage, which would have detected this.

It is exactly this brittleness why I'm looking forward to your feedback at #2708787: Port Far Future expiration to 8.x-3.x to determine whether it's worth porting the Far Future expiration support to the Drupal 8 version of the CDN module.

Crediting @captainack as the patch author, and crediting @muldrow and @fgm for their testing.

  • Wim Leers committed f5d0d74 on 7.x-2.x authored by captainack
    Issue #2667494 by captainack, Oleksiy, muldrow, fgm: Follow-up for #...
Wim Leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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