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.
Today I found that I needed to exclude the Ubercart JS from aggregation, because we pass the aggregated JS through Lighttpd, and that wasn't working for Ubercart JS.
Unfortunately, the aggregator at admin/settings/performance doesn't let you exclude by path, like it did in the 5.x Javascript Aggregator module.
It would be great if that functionality could be added back in. As it was, I had to hack includes/common.inc as follows:
function drupal_get_js($scope = 'header', $javascript = NULL) {
...
foreach ($javascript as $type => $data) {
...
switch ($type) {
...
default:
foreach ($data as $path => $info) {
if(strpos($path, "uc_")) { $info['preprocess'] = FALSE; } // added to exclude Ubercart JS
...
Comments
Comment #1
EvanDonovan CreditAttribution: EvanDonovan commentedActually, as it turned out my issue was http://www.ubercart.org/forum/bug_reports/10927/ajax_js_fails_when_cartc....
However, I still think it would be great if the JS path exclusion could be added to the core JS aggregator.
Comment #2
EvanDonovan CreditAttribution: EvanDonovan commentedThis didn't get added to the Javascript aggregation in 7.x did it?
Comment #3
EvanDonovan CreditAttribution: EvanDonovan commentedComment #4
jhedstrom