Is anyone hosting their site on Pantheon and using this module? We're running into issues with how they handle their file system and keeping our bundled caches up to date. The result is the module complaining a lot about missing files, particularly CTools CSS caches. I can share my debugging information, but I wanted to first ask if anyone else has run into similar issues.

Thanks,
Andrew

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rares’s picture

The module works well on Pantheon. The on-demand aggregation does not work (and it is not because of the fast_404 module, it is because of Pantheon's server structure, see the debug tab), but that's not a problem.
We used this module successfully to get rid of some very annoying 404 errors that were appearing on aggregated CSS+JS right after they were generated.

banoodle’s picture

I notice you guys are talking about the 6.x version.

I'm on the 7.x version and I'm having serious problems and am wondering if it just can't work on a pantheon hosted site?

I enabled and configured Adv Agg (we wanted the 4095 css chopping for an IE-dependent client) on our pantheon dev site and everything worked great.

But when I pushed the code, db and files up to our test site, I now get dozens of pantheon login prompts and they're for IP address 23.253.170.146:11119 (not even sure what this is - dev perhaps?)

I tried doing the following on the dev site: cleared all files and cache available under Adv Agg settings>Operations, then disabled the module, cleared all normal drupal cache, ran cron.

Then we ported everything over to the Test site again (completely overwriting the old test site).

On test we cleared cache, ran cron, and enabled and configured the adv agg module. We were hoping this would eradicate all sign of dev if that was what was the problem - but we're still getting the annoying prompts.

This problem will go away if I leave the adv agg module enabled but just disable the adv agg setting "Enable advanced aggregation" - but then I don't get the 4095 css selector chopping that was the original goal.

Any ideas?

I'll ask Pantheon support about this too and will report back here in case anyone else is struggling with this.

banoodle’s picture

I should have mentioned: this is on an Open Atrium 2 site with private files enabled. I suspect it has something to do with private files because the problem only happens to unauthenticated users.

banoodle’s picture

Fantastic! Pantheon Support got back to me with a great solution.

I'm not clear whether all pantheon sites that use Adv Agg need to do this or if it is just needed on ones that use private files like us.

You just have to add a snippet like this to your settings.php file. Just change the URLs to fit your sites...

if (isset($_SERVER['PANTHEON_ENVIRONMENT'])) {
switch ($_SERVER['PANTHEON_ENVIRONMENT']) {
case 'dev':
$base_url = 'http://dev-sitename.gotpantheon.com'; // NO trailing slash!
break;
case 'test':
$base_url = 'http://test-sitename.gotpantheon.com'; // NO trailing slash!
break;
case 'live':
$base_url = 'http://www.domain.tld'; // NO trailing slash!
break;
}
}

After I pushed this code change to all my sites (dev, test, live), I just had to clear cache, and enable Adv Agg.

In my case, doing this fixed the problem with the mysterious prompts, but my font-awesome menu icons weren't rendering properly. I found that disabling the .gz option under Adv Agg settings fixed this. In my case I think this is OK.

I tested the site on IE9 on windows 7 and can see the styles working perfectly so I know the 4095 selector chopping is working as well.

mikeytown2’s picture

Version: 6.x-1.9 » 7.x-2.x-dev

@banoodle
I'll add this to the readme file tomorrow. Would there be some way for me to detect the exact issue you were experiencing? AdvAgg will run a bunch of tests on the status report page, usually alerting the admin of potential issues; wondering if you can think of some sort of "tell" that would let the admin know they have this problem and then AdvAgg can point them to a potential solution for it.

banoodle’s picture

Thanks @mikeytown2!

It's an interesting problem because when you initially set up and enable adv agg on your dev site, everything works great. It isn't until or unless you git pull the code and db up to Test and Live that you have any apparent problem.

To see the problem, you must be not logged into the site (authenticated users don't see any of the many prompts). And I suspect (but haven't verified) that you might not have any problem if you're using only public file storage on your site.

The problem itself consists of numerous (maybe a dozen) Pantheon authentication prompt pop-up windows. All of them reference this IP address: 23.253.170.146:11119 but that might be unique to my pantheon account.You can enter your pantheon credentials or cancel the prompts: either way you get about a dozen of them and then you finally do get to the homepage of the site (and it looks OK and you can then login).

After this happened, I went to admin/config/development/performance/advagg and then clicked on the Information tab: there were a bunch of errors listed, but I didn't capture them and can't recall precisely what they said. But it did seem like there was one error per login prompt I had seen.

If you need me to, I can get the details - but probably won't get to it until the weekend.

Great module, BTW - thanks for making it possible. Saved our bacon!

Anne

mikeytown2’s picture

Status: Active » Needs review
FileSize
973 bytes

If you could provide a sentence or two describing the issue, that will help people figure out if they need to add this to their settings.php file.

banoodle’s picture

Hows about:

Numerous login prompts after enabling Adv Agg module on Pantheon Test and Live instances.

Anne

mikeytown2’s picture

Status: Needs review » Fixed
FileSize
1.87 KB

Following patch has been committed.

  • mikeytown2 committed 746aa9e on 7.x-2.x
    Issue #2200003 by mikeytown2: Offer advice on fixing issues with...

Status: Fixed » Closed (fixed)

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

darol100’s picture

I'm having a similar issue, which font awesome is been pointing to a different hostname (the machine name). As part of my workflow, I have multiples environment just like Pantheon. I will try to add a different $base_url per environment and see if works.

If so, we should add some documentation about how to handle different environments.

I will share my results once I try to add a $base_url per environment.