Hi
I d love to have CSS aggregation as a setting for each domain.

I was wondering wheter it was possible in settings.php with

$conf['preprocess_css']

but since with Domain access we have an unique settings.php file, is there a way to wrap it in a domain selector?
tx
Simone

PS: I d be happy to with a theme based configuration but this is offtopic here of course

Comments

agentrickard’s picture

I'm not sure that this is possible. If someone wants to do some testing, I can help look at the results.

cimo75’s picture

Hi
the solution is pretty easy, for something like

http://test.mydomain.com

if (isset($_SERVER['HTTP_HOST'])) {
   if (stristr($_SERVER['HTTP_HOST'],"test")) {
$conf['preprocess_css'] = '0' ;
}
}

S.

agentrickard’s picture

No. It's really not, as I have doubts that will get you the proper contextual file aggregation. That would need to be tested thoroughly.

Instead of hacking this in settings.php, the proper way is to add the form element to domain_conf_domain_batch(), then you can toggle it via the UI.

agentrickard’s picture

Status: Active » Needs review
StatusFileSize
new2.56 KB

Here's a patch that needs testing. It adds all the "bandwidth optimization" settings from the Performance page.

cimo75’s picture

Wow impressive support, seems to work beautifully.
tx
Simone
(this is perfect for those like me doing some "live" development, I know, I know I should go GIT...)

agentrickard’s picture

I just wonder how we can "prove" that this works properly.

Perhaps I'm just being paranoid. If core aggregation techniques are done using the uri as a key, then this should work just fine. I also wonrder about CSS and JS cache clearing, and am not sure how to properly test these behaviors.

agentrickard’s picture

StatusFileSize
new95.98 KB

Here's the kind of thing I was worried about. I think this is caused by the "gzip" settings. This is a page served from cache.

agentrickard’s picture

Status: Needs review » Needs work

Yup. Compressing cached pages fails.

cimo75’s picture

Nice artwork... sorry I can t help with that, anyway for my purposes (a side site to start developing along th emain one) the functionality offered by the patch is fine.
S.

agentrickard’s picture

No, you need to help with that. Watch out for any odd errors like this one caused by the patch. It also may need a re-roll to remove that setting.

It is errors like that which prevent this feature from ever being committed.

agentrickard’s picture

Status: Needs work » Needs review
StatusFileSize
new1.96 KB

Removed.

cimo75’s picture

Seems all good here, testing....

cimo75’s picture

Issue summary: View changes

+1 to get this one into the module.

vincent_jo’s picture

Hi,
is this patch (#11, or which one?) proved to apply to a site already in production?
I need to develop a sub-domain on a "live site".

cimo75’s picture

Hi I've been using it since 2 years with no issues.

bluegeek9’s picture

Status: Needs review » Closed (outdated)

Drupal 7 in End of Life and no longer supported. We encourage you to upgrade to a supported version of Drupal. For more information, see https://www.drupal.org/upgrade.

//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support of this project makes other volunteer contributions more sustainable.
There are multiple ways to show appreciation for the work contributed to this project, including:
  • Triaging issues and adding more context to existing issues.
  • Writing documentation or patches for this project.