12.10 php
CGI622
Note
CGI622 did not leave a note
  1.  
  2. Hey Matt,
  3. Thanks for the fast response.
  4. Updating line 51 in the Asset.php was one of the first things I've done. Separating the addition of files did not make any difference.
  5. However, changing debug from 2 or 1 to 0 yielded a blank page with only the page title displayed (body part is empty)!!!
  6.  
  7. I thought the  problem might have to do with Google Maps, so I tried your method with a different page that doesn't call or make use of the Google Maps API,
  8.  
  9. I placed the following lines in the Header section of the layout:
  10.  
  11. <?php ($javascript->link('jquery/jquery-1.1.4.pack.js',false)); ?>
  12. <?php ($javascript->link('jquery/jquery.lavalamp.js',false)); ?>
  13. <?php ($javascript->link('jquery/jqModal.js',false)); ?>
  14. <?php  $javascript->codeBlock(' var $j = jQuery.noConflict();'); ?>
  15. <?php  ($javascript->link(array('forms.js',false)));?>
  16. <?php  ($javascript->link('prototype/prototype.js',false));?>
  17. <?php ($javascript->link('search.js',false)); ?>
  18. <?php  echo $asset->scripts_for_layout(); ?>
  19.  
  20. and unfortunately, no JS files were included in the header, and the page still is blank (debug is still set to 0)
  21.  
  22. And then, I tried the following:
  23.  
  24. <?php e($javascript->link('jquery/jquery-1.1.4.pack.js',false)); ?>
  25. <?php e($javascript->link('jquery/jquery.lavalamp.js',false)); ?>
  26. <?php e($javascript->link('jquery/jqModal.js',false)); ?>
  27. <?php  echo $javascript->codeBlock('    var $j = jQuery.noConflict();'); ?>
  28. <?php  e($javascript->link(array('forms.js',false)));?>
  29. <?php  e($javascript->link('prototype/prototype.js',false));?>
  30. <?php e($javascript->link('search.js',false)); ?>
  31. <?php  echo $asset->scripts_for_layout(); ?>
  32.  
  33. and only var $j = jQuery.noConflict();'); was outputted in the header !!
  34.  
  35. When changing the code to what I originally had (before trying to make use of Asset.php):
  36. <?php e($javascript->link('jquery/jquery-1.1.4.pack.js')); ?>
  37. <?php e($javascript->link('jquery/jquery.lavalamp.js')); ?>
  38. <?php e($javascript->link(array('jquery/jqModal.js'))); ?>
  39. <?php echo $javascript->codeBlock(' var $j = jQuery.noConflict();'); ?>
  40. <?php  e($javascript->link(('forms.js')));?>
  41. <?php  e($javascript->link('prototype/prototype.js'));?>
  42. <?php e($javascript->link('search.js')); ?>
  43. <?php   $asset->scripts_for_layout(); ?>
  44.  
  45. The page worked perfectly fine, and everything was displayed correctly. This is how I left it for now. The JS files are not merged, nor minified, and I didn't manage to get the helper to work.
Parsed in 0.113 seconds, using GeSHi 1.0.7.14

Modify this Paste