Hi,

This is not really a bug, because this module works perfectly with the official Drupal distribution, but I will leave it here if someone else finds the same problem than me.

I filled a issue in the Pressflow web https://bugs.launchpad.net/pressflow/+bug/605867

I paste it here too:
------------------------------------------------------------------------
Pressflow makes a modification in common.inc (about line 2262)

$preprocessed .= '

'."\n";
Change to:
$preprocessed .= '

'."\n";

So the url is an absolute path to the site instead of relative (like normally).

The problem is that the module Javascript Aggregator http://drupal.org/project/javascript_aggregator will look into $variables['scripts'] trying to find files to minify using a pattern based on base_path(), without success.

$path_to_files_directory = base_path() . file_directory_path();
$pattern = "!(

<\/script>)!"; Result: it doesn't minify anything. Bug I suppose it exists since this revision http://vcs.fourkitchens.com/pressflow/6/revision/74.1.1 ----------------------------------------------------------------------------- Also there is other modules having same problem with CDN Module. See http://drupal.org/node/839282 I don't know where is going to come the solution, but it will be great to work together on this.

Comments

ak’s picture

subscribe

Anonymous’s picture

subscribe

eliosh’s picture

subscribe

eliosh’s picture

I solved in a simple manner, hoping that this bug is solved "upstream" in pressflow (i suppose)

in function xxx i change in this way:

    // $pattern = "!(<script type=\"text\/javascript\" src=\"$path_to_files_directory)(.*?)(\"(.*?)><\/script>)!";
    $pattern = "!(<script type=\"text\/javascript\" src=\")(.*?)($path_to_files_directory)(.*?)(\"(.*?)><\/script>)!";
    if (preg_match_all($pattern, $scripts, $matches) > 0) {
      $aggregated_file_name = $matches[4][0];
      if($aggregated_file_name==$GLOBALS[base_url]){
        $aggregated_file_name=$matches[5][0];
      }

What i change was $pattern variable and the if($aggregated_file_name==$GLOBALS[base_url]){ row.
It is supposed to work with drupal (tested 50%) and pressflow (tested 100%)

wim leers’s picture

Assigned: Unassigned » wim leers

Marked #837536: Domain / CDN support as a duplicate.

wim leers’s picture

Category: support » task
Status: Active » Fixed

This was actually fixed in #770374: Incompatible with Parallel module, basically using the same approach as in #837536: Domain / CDN support.

wim leers’s picture

Status: Fixed » Reviewed & tested by the community

However, the maintainer of the Javascript Aggregator module should make a new release. Then people don't have to install 6.x-1.x-dev anymore.

wim leers’s picture

Status: Reviewed & tested by the community » Fixed

I forgot about this issue, but now it's fixed over at #938240: Make 1.5 release — a new release has been made! :)

Status: Fixed » Closed (fixed)

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