Forums / All Other Contributions/Addons / css javascript loader addon problems

css javascript loader addon problems

Started by tony_sar on 24 May 2010, 11:22 PM · Views: 61,262

Results 41 to 60 of 111
26 Oct 2010, 4:35 PM
#41
finlander avatar

finlander

Zen Follower

Join Date:
Oct 2010
Location:
Idaho
Posts:
293
Plugin Contributions:
0

css javascript loader addon problems

countrycharm,

Thanks for your advice. I need to be clear - are you talking about putting this code in html_header, and not doing anything about needing some sort of loader file in the auto loader directory? If so, I know how to do that, but what about the CSS Loader 'Usage' instructions that say something about duplicating and renaming the sample loader file in the autoloader directory? When I did that, my site broke. I rolled back my site to function again, and now (without making a duplicate of sample file in auto loader directory) I can make Easy Login work, but Fast and Easy checkout seems to be hiding behind the stock login screen. I did install Paypal express previously, but it's that first 3-panel login screen that FEC now seems to be failing to load into when Go to Checkout is clicked from the shopping cart.

just wanted to clarify..

Quote:
Originally Posted by finlander
okay, I'm starting to fix it, but what is with the CSS Loader Usage instructions about duplicating and renaming the loader_sample file in the autoloader directory?

Does it need to be done?

If so, in what way?, because my best effort caused total breakage in the browser.

Take the includes/templates/your_template/common/html_header.php and copy the contents below and insert it in that file nothing else and see if that want solve your problem.

PHP Code:

<?php /** * Common Template * * outputs the html header. i,e, everything that comes before the \</head\> tag <br /> *

etc ......

26 Oct 2010, 6:10 PM
#42
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,129
Plugin Contributions:
56

Re: css javascript loader addon problems

Sorry, countrycharm. I saw the 2007 copyright in the header and assumed that it wasn't for the 1.3.9 version ....

27 Oct 2010, 3:37 AM
#43
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: css javascript loader addon problems

finlander:

countrycharm,

Thanks for your advice. I need to be clear - are you talking about putting this code in html_header, and not doing anything about needing some sort of loader file in the auto loader directory? If so, I know how to do that, but what about the CSS Loader 'Usage' instructions that say something about duplicating and renaming the sample loader file in the autoloader directory? When I did that, my site broke. I rolled back my site to function again, and now (without making a duplicate of sample file in auto loader directory) I can make Easy Login work, but Fast and Easy checkout seems to be hiding behind the stock login screen. I did install Paypal express previously, but it's that first 3-panel login screen that FEC now seems to be failing to load into when Go to Checkout is clicked from the shopping cart.

just wanted to clarify..

etc ......

are you talking about putting this code in html_header, and not doing anything about needing some sort of loader file in the auto loader directory?Thats correct. The css loader will work without doing anything to auto loader directory that is for Developers who want certain pages on there site to loaded in a particular order. Hope this helps. You can skip the section below.

The module comes with an example in includes\templates\YOUR_TEMPLATE\auto_loaders
Basically you will have to place a new file in the auto_loaders folder, this file must have the form: loader_something.php
The content of the file should look exactly like the sample file.
Conditions

 Currently the module supports 2 types of condition:  
  1. pages: you can decide to load the script(s) on certain pages (main_page=something).You can use array('*') for all pages
  1. call_backs: or you can call back functions, please note that class method is supported as well.

Order

 You can set the order that the scripts should be loaded. Currently ZC  loads css/scripts alphabetically, this may have some undesired effect.  So this module helps you to decide which one should be loaded in which  order. 

Duplication

 No need to worry about duplication, if you have more than one modules  that require the same css/jscript files (and those modules use this  css/javascript autoloader), then this module will make sure each file is  loaded only once. 

Minify

 You can change Minify settings via admin→configuration→CSS/JS Loader 

Browser Compatibility

 To use create a new file with name: [browser-version]-whatvernamehere.[your-extension] 

[browser-version] currently support these options: ie6, ie7, ff, safari, chrome
If you want to have more options (ff3 for example), then edit html_header.php file located in includes/templates/YOUR_TEMPLATE/common of the package.
[your-extension]: currently support these options: css, js
You will have to place the files in appropriate folders (js files in “jscript” folder, css files in “css” folder)

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

27 Oct 2010, 3:45 AM
#44
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: css javascript loader addon problems

lat9:

Sorry, countrycharm. I saw the 2007 copyright in the header and assumed that it wasn't for the 1.3.9 version ....
No problem thats why I always tell people to take the updated zen cart file or files and compare and merge. You will never go wrong if you would just do that. Still I'm glad you updated the file for any who needs it. The one I posted I just deleted the code and updated it not the top part where it said 2007

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

13 Nov 2010, 9:25 PM
#45
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: css javascript loader addon problems

I'm totally confused right now. I've installed this mod in other 1.3.9 stores and had no issues, but I'm trying to install it in a fresh 1.3.9h store and the whole site is blank. I used the latest version of the CJ Loader files and merged the html_header file. My log file says this:

[13-Nov-2010 15:23:27] PHP Parse error: syntax error, unexpected ')', expecting '(' in /home/baby/public_html/new/includes/classes/class.cj_loader.php on line 158

Any ideas on how I can fix this?

Thanks!

Danielle

14 Nov 2010, 1:06 AM
#46
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: css javascript loader addon problems

Danielle:

I'm totally confused right now. I've installed this mod in other 1.3.9 stores and had no issues, but I'm trying to install it in a fresh 1.3.9h store and the whole site is blank. I used the latest version of the CJ Loader files and merged the html_header file. My log file says this:

[13-Nov-2010 15:23:27] PHP Parse error: syntax error, unexpected ')', expecting '(' in /home/baby/public_html/new/includes/classes/class.cj_loader.php on line 158

Any ideas on how I can fix this?

Thanks!
You say you are using the latest version of CJ Loader files. What version would that be? Have you tried taking the /includes/templates/template_default/common/html_header.php file and opening it in a good text editor, erase all information add what is showing down below. Make sure the default template is renamed to whatever yours is.

<?php
/**
 * Common Template
 *
 * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
 * 
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: html_header.php 6948 2007-09-02 23:30:49Z drbyte $
 */
/**
 * load the module for generating page meta-tags
 */
require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php'));
/**
 * output main page HEAD tag and related headers/meta-tags, etc
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
<title><?php echo META_TAG_TITLE; ?></title>

<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="<?php echo STORE_NAME .', ' . TEMPLATE_DESIGN_TEXT . ', shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce';?>" />
<meta name="generator" content="shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce" />
<?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<?php if (defined('FAVICON')) { ?>
<link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<?php } //endif FAVICON ?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
<?php if (isset($canonicalLink) && $canonicalLink != '') { ?>
<link rel="canonical" href="<?php echo $canonicalLink; ?>" />
<?php } ?>

<?php
/**
* load the loader files
*/

if($RI_CJLoader->get('status')){
    $directory_array = $template->get_template_part(DIR_WS_TEMPLATE.'auto_loaders', '/^loader_/', '.php');
    
    $loaders_check = $RI_CJLoader->get('loaders');
    if($loaders_check == '*' || count($loaders_check) > 0){
        while(list ($key, $value) = each($directory_array)) {
        /**
        * include content from all site-wide loader_*.php files from includes/templates/YOURTEMPLATE/jscript/auto_loaders, alphabetically.
        */
            if($loaders_check == '*' || in_array($value, $loaders_check))
                require(DIR_WS_TEMPLATE.'auto_loaders'. '/' . $value);
        }
    }
    
    $RI_CJLoader->loadCssJsFiles();
    $files = $RI_CJLoader->processCssJsFiles();
    foreach($files['css'] as $file)
        if($file['include']) include($file['string']);
        else echo $file['string'];
        
    foreach($files['js'] as $file)
        if($file['include']) include($file['string']);
        else echo $file['string'];
}
//DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
?>
</head>
<?php // NOTE: Blank line following is intended: ?>  

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

15 Nov 2010, 9:39 PM
#47
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: css javascript loader addon problems

Figured it out :) The site I am installing it on is an upgrade of a current site. The current site is on the same server and is using Zen-Cart v1.3.5. I had to force it to use PHP 4 in the .htaccess so that was making the CJ Loader not work on the new 1.3.9h site. I had to edit the .htaccess to force PHP 5 for the new site. Once the new site is totally finished and I delete the old site, it will just use PHP 5 by default.

Danielle

23 Dec 2010, 7:53 AM
#48
dorie avatar

dorie

New Zenner

Join Date:
Jul 2010
Posts:
17
Plugin Contributions:
0

Re: css javascript loader addon problems

Originally Posted by dorie
Please HELP! I just finish loading this TPP v1.07 and my home page with jscript_easySlider.js in define_main_page.php is not working any more. Please HELP! Thanks
my testing site,
http://w w w.e l i t e h f.c o m/ehfstore

I install below functions recently.
jscript_easySlider,
jscript_scroller,
Cross sell v1.30 + Advance Cross Sell,
Ultimate SEO,
TPP v1.07

You might wanna ask this question in the support thread for the jscript_easySlider.
I found this thread thru easySlider and close to my issue. Please anyone HELP! Thanks

26 Dec 2010, 6:21 PM
#49
dorie avatar

dorie

New Zenner

Join Date:
Jul 2010
Posts:
17
Plugin Contributions:
0

Re: css javascript loader addon problems

dorie:

I found this thread thru easySlider and close to my issue. Please anyone HELP! Thanks
Never mind, I guess I make it working by reading this entire posts and 1) create the load_easyslide.php in mytemplates/auto_loaders folder, 2) stylesheet_easyslide.css in mytemplates/css, 3) download and save v1.4.2 jquery.min.js to mytemplates/jscript folder. Without jquery.min.js is not working.

11 Feb 2011, 12:42 AM
#50
asimms1 avatar

asimms1

New Zenner

Join Date:
Dec 2007
Posts:
42
Plugin Contributions:
0

Re: css javascript loader addon problems

Can anybody help me with this problem? When I go to the min/builder folder I get this error. The store is running, I had to load this to get the FEC to work and not hang up on processing, so I don't understand why this is happening? any ideas?

Warning: include(includes/configure.php) [function.include]: failed to open stream: No such file or directory in /home/content/49/5183749/html/min/config.php on line 8

Warning: include() [function.include]: Failed opening 'includes/configure.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/49/5183749/html/min/config.php on line 8

Warning: ini_set() [ref.outcontrol]: Cannot change zlib.output_compression - headers already sent in /home/content/49/5183749/html/min/config.php on line 161

Warning: Cannot modify header information - headers already sent by (output started at /home/content/49/5183749/html/min/config.php:8) in /home/content/49/5183749/html/min/builder/index.php on line 14

Thank you!

I will trade you a Bing shopping export script if you can help :)

Adam

If everybody had money, there would still be the poorest man in the word; If everybody had love, it wouldn't matter.

19 Feb 2011, 12:46 PM
#51
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: css javascript loader addon problems

trying to get this to work so i can use fec. I'm using 1.3.9h. Any ideas?:frusty:

19 Feb 2011, 1:34 PM
#52
kidsstuff avatar

kidsstuff

New Zenner

Join Date:
Oct 2010
Posts:
44
Plugin Contributions:
0

Re: css javascript loader addon problems

joyjoy:

trying to get this to work so i can use fec. I'm using 1.3.9h. Any ideas?:frusty:

I'm using it with fec here without any problem. Surely you must have missed something in the installation steps.

19 Feb 2011, 9:32 PM
#53
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: css javascript loader addon problems

joyjoy:

trying to get this to work so i can use fec. I'm using 1.3.9h. Any ideas?:frusty:

I have it installed, but not enabled and fec works fine. I didn't enable, because i get errors.

19 Feb 2011, 9:42 PM
#54
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: css javascript loader addon problems

Design75:

I have it installed, but not enabled and fec works fine. I didn't enable, because i get errors.Out of interest if you enable Minify does your CSS still load on your product pages?

I installed CJ Loader when I installed Tabbed Products Pro. Everything works fine for me until I enable Minify. The problem is only evident when viewing a product. On all other pages my CSS loads.

19 Feb 2011, 11:23 PM
#56
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: css javascript loader addon problems

Thanks for letting me know. Any chance you could post or PM your version of > /includes/templates/MY_TEMPLATE/common/html_header.php so that I can compare it with mine?

Mine is posted here.

20 Feb 2011, 10:51 AM
#57
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: css javascript loader addon problems

That's great that it has worked for you guys. Would anyone mind uploading the files they've used? I see there is a 1.3.9h file uploaded in this thread and I've tried to use it...with no luck. It seems to be a VERY easy install so I don't think I'm missing anything. I have read other references where this was not compatible with 1.3.9h to work properly without encountering a lot of errors...

20 Feb 2011, 11:08 AM
#58
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: css javascript loader addon problems

Try downloading from the link on Yellow's blog.
http://blog.rubikintegration.com/2011/02/07/new-feature-for-css-javascript-loader/

I think this is the latest version. My problems are caused by the modified version that seems to be included with Tabbed Products Pro so we are not troubleshooting the same thing.

20 Feb 2011, 11:28 AM
#59
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: css javascript loader addon problems

Thanks for the link, that wasn't the version I was using. I've tried to install and I get the same results.

I know that I have to run the SQL patch, I know from there I need to transfer all of the files. The only file that is a override is the html_header files. All the other files are new. So if any files have any conflicts it should only lie in the html_headr file right?

OH and when I upload the SQL file I get a message that says:
9 statements processed.
ERROR: Cannot insert configuration_key "" because it already exists
Warning Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.

I'm guessing it's an issue with the SQL patch...but what does this mean? How do I fix it? Any ideas? Thank you!

20 Feb 2011, 12:02 PM
#60
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: css javascript loader addon problems

You have the blind leasing the blind here so you may want to take advice from some more knowledgeable :smile:

I think you SQL errors are simply caused because you are running the same statements again. It's saying I can't add that because it already exists i.e. it's there from your last attempted install.

Compare the two versions of the SQL patch and if they are the same the you don't need to run them again.

In answer to your other question yes I think html_header is the clue. Have you tried the versions suggested above?