Allow some excluded files (e.g. jquery.js) before aggregation?

joshk - August 22, 2008 - 21:32
Project:Javascript Aggregator
Version:5.x-1.3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

I'm seeing an issue where jquery 1.2.6 (I live dangerously) will not work correctly if its aggregated/compressed. However, if I exclude it, it's added after the aggregated hunk, meaning all jquery-dependent scripts are now broken.

Any chance to extend the module to allow "exclude before" and "exclude after" as options, or the like?

#1

btully - October 10, 2008 - 06:56

having the same issue with jquery. am working on a fix which allows one to specify which scripts to ignore to be loaded BEFORE and AFTER aggregated scripts. Working fine for me. I added to my existing file which also includes the JsMin patch, so it might take me a day or so before I can post a clean patch for release

#2

specialt - October 14, 2008 - 23:10

Just change the part where it says array_unshift($scripts_js_links, base_path().$jsfile); to array_push($scripts_js_links, base_path().$jsfile); Then it gets loaded before the aggregated file

#3

btully - October 16, 2008 - 19:03

Finally had some time to create patches, attached below. I've included a patch to original that breaks up exclude options into "pre" and "post" and allows setting via an additional textfield.

I've also added another patch in case anyone is using the JSMin patch referenced here: http://drupal.org/node/251140.

Both patches are working successfully for me on a prod site.

Hope that helps!

regards,
brian

AttachmentSize
javascript_aggregator_pre_exclude_orig.patch 5.2 KB
javascript_aggregator_pre_exclude_jsmin.patch 6.38 KB

#4

spiffyd - January 17, 2009 - 19:53
Version:5.x-1.3» 6.x-1.x-dev

Does this work for 6.x? How can I exclude JS files such as TinyMCE's (which has issues with aggregation) in 6.x?

#5

derjochenmeyer - May 1, 2009 - 12:33
Version:6.x-1.x-dev» 5.x-1.3
Status:active» won't fix

Please dont change the version of this issue. This patch is valid only for Drupal 5.

Your question is answered here #369871: does the D6 version not include the 'exclude' ability / feature?

 
 

Drupal is a registered trademark of Dries Buytaert.