CMS MADE SIMPLE FORGE

CGExtensions

 

[#11387] wrong cache set for class.jsloader.php and patch

avatar
Created By: Philippe Thomas (filto)
Date Submitted: Mon May 22 21:42:45 -0400 2017

Assigned To: Robert Campbell (calguy1000)
Version: 1.55.1
CMSMS Version: 2.1.6
Severity: Minor
Resolution: Fixed
State: Open
Summary:
wrong cache set for class.jsloader.php and patch
Detailed Description:
for compatibilty with CONGIFG.php parameters :

if $config['public_cache_location']
and $config['tmp_cache_location']
are NOT set to "tmp/cache"

{cgjs_render} doesn't output files in good directories.

Patched like this :

CGExtensions/lib/jsloader/class.jsloader.php

Lines 673 & 674
$cache_js = TMP_CACHE_LOCATION."/cgejs_{$sig}.js";
$cache_css = TMP_CACHE_LOCATION."/cgejs_{$sig}.css";
#corrected like :
$cache_js = PUBLIC_CACHE_LOCATION."/cgejs_{$sig}.js";
$cache_css = PUBLIC_CACHE_LOCATION."/cgejs_{$sig}.css";

Line 793 (js ouput)
$cache_url = $config['root_url'].'/tmp/cache/'.basename($cache_js);
#corrected like :
$cache_url = $config['public_cache_url'].'/'.basename($cache_js);

Line 798 (css output)
$cache_url = $config['root_url'].'/tmp/cache/'.basename($cache_css);
#corrected like :
$cache_url = $config['public_cache_url'].'/'.basename($cache_css);
#or
$cache_url =$config['css_url'].'/'.basename($cache_css);


Then it works


History

Comments
avatar
Date: 2017-05-23 08:40
Posted By: Robert Campbell (calguy1000)

fixed in svn, thanks
      
Updates

Updated: 2017-05-23 08:40
resolution_id: 5 => 7

Updated: 2017-05-22 21:56
description: for compatibilty with CONGIFG.php parameters : if $config['public_cache_location'] and $config['tmp_cache_location'] are NOT set to "tmp/cache" {cgjs_render} doesn't output files in good directories. Patched like this : CGExtensions/lib/jslo => for compatibilty with CONGIFG.php parameters : if $config['public_cache_location'] and $config['tmp_cache_location'] are NOT set to "tmp/cache" {cgjs_render} doesn't output files in good directories. Patched like this : CGExtensions/lib/jslo
resolution_id: => 5