Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293442

Best CSS aggregation with "aliases"

$
0
0

API page: http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_b...

Hello,

A suggestion :
The CSS filename or CSS path must depends on base_path or base_url.
(In function drupal_build_css_cache, includes/common.inc, line 3535 :
$filename = 'css_' . drupal_hash_base64($data) . '.css';)

Indeed, in "drupal_build_css_cache", we have "_drupal_build_css_path" ... This function prefixes with base path and removes '../' segments where possible. the generated CSS file does references to a "static base path" even if aliases sites (@sites.php) is different.
Example :
$sites = array(
'example.com.mypublicUri' => 'example.com',
'example.com.myprivateUri' => 'example.com',
);
The "Http://example.com/mypublicUri" CSS files references "/myprivateUri" (like background: url("/myprivateUri/images/green.jpg") ).

Other example : Module "Boost" uses aliases subdirectories to save cache files (css, js, html etc...)

Thanks for your time and consideration.

Best regards,
Gg


Viewing all articles
Browse latest Browse all 293442

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>