Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Weird error even with a skeleton

Weird error even with a skeleton

Locked

Views: 6,282

Results 1 to 20 of 35
This thread is locked. New replies are disabled.
14 Feb 2008, 6:13 AM
#1
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Weird error even with a skeleton

This problem came out of my interest in a category replacement that wouldn't work for me. As soon as the Auto_Loader was added, all I'd receive was a blank page.

  1. I have turned on logging, display_startup errors, display errors.
  2. I've added enable_error_logging.php file to the /includes/extra_configures/ folder.
  3. I have also done the following in /includes/local/configure.php
<?php
  ini_set('display_errors', '1');
  //define('STRICT_ERROR_REPORTING', true);
  error_reporting(E_ALL | E_STRICT); 
?>

Now for the code, the Auto_Loader is

<?php
/**
 * ch_categories_tree_generator
 * @Version: 
 * @Authour: 
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */ 
//if (!defined('IS_ADMIN_FLAG')) {
//    die('Illegal Access');
//}
$autoLoadConfig[100][] = array('autoType'=>'class', 'loadFile'=> 'simple_categories_generator.php');
$autoLoadConfig[100][] = array('autoType'=>'classInstantiate',
                                'className'=>'simple_categories_gen',
                                'objectName'=>'cat_gen');
//                                'checkInstantiated'=>true,
//                                'classSession'=>true);
//$autoLoadConfig[200][] = array('autoType'=>'objectMethod',
//                                'objectName'=>'cat_tree',
//                                'methodName' => 'init');
?> 

And the complex and fancy class is (aka stub)

<?php
/**
 * Simple Category Tree
 * @Version: Beta 1
 * @Authour: yellow1912
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */ 

class simple_categories_gen extends base {
    function simple_categories_gen() {die("help");}
    function init(){ die("me"); }
}
?> 

now it used to actually have code, but I cut it all out in an attempt to find the problem. I've added Die("here") to the class file and that worked... but adding die("here") IN the class methods doesn't actually get executed.

Now yellow1912 and I have spent a lot of time on this and have hit a brick wall. So I really need some new ideas and feedback please.

14 Feb 2008, 6:22 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Weird error even with a skeleton

Not sure what's wrong with your setup.

When I implement it, I get a white screen with the word "help" in top left corner, which corresponds with your die('help') statement.

What folders and filenames have you used when uploading these to your server?

14 Feb 2008, 6:43 AM
#3
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Re: Weird error even with a skeleton

the first is in includes\auto_loaders and the second is in includes\classes.

I am also using PHP 5.2.5 if you need I can paste potions of the php_info() if that would help.

Pulls out his second last hair....

14 Feb 2008, 6:51 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Weird error even with a skeleton

I put the first in a file named /includes/auto_loaders/config.cat_gen.php
and the second in /includes/classes/simple_categories_generator.php

14 Feb 2008, 6:52 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Weird error even with a skeleton

Try adding this to your /includes/local/configure.php:

define('DEBUG_AUTOLOAD',true);
14 Feb 2008, 6:56 AM
#6
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Re: Weird error even with a skeleton

  1. added code to configure
  2. tried renaming the auto_load to conform to DrBytes

And goes to a blank page. Here I'll leave it on for next few min so you can see what I'm seeing.....

14 Feb 2008, 6:58 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Weird error even with a skeleton

You probably need to clear your browser cache or something.

When I visit your store, I see: > Notice: Constant DEBUG_AUTOLOAD already defined in C:\Inetpub\TGI.ca\Products\includes\local\configure.php on line 4

help

... the "help" part is your die() statement ...

... so it appears to be running fine.

14 Feb 2008, 7:06 AM
#8
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Re: Weird error even with a skeleton

Now this is so bizzare... eyes last hair threateningly...

in IE... I see...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML>

in FireFox I get....

NOTHING

Tried on the web server and another machine (both on this side of the firewall).....

14 Feb 2008, 7:07 AM
#9
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Weird error even with a skeleton

Same here, which browser you are using DrByte?

14 Feb 2008, 7:28 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Weird error even with a skeleton

I was looking via IE6

Now I'm seeing just the *Notice: Constant DEBUG_AUTOLOAD already defined * at the top of the store, followed by the rest of the main home page.

14 Feb 2008, 7:32 AM
#11
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Re: Weird error even with a skeleton

I turned off that auto_load.. the IE version I am using is IE 6.0.2800.1106

and still see nothing... comment out that DEBUG_AUTOLOAD line in the configuration.php and my page loads...

... tugs thoughtfully at last remaining hair......

14 Feb 2008, 7:36 AM
#12
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Weird error even with a skeleton

I hope we are looking at the same url, which is:
http://www.totalgarage.ca/Products/index.php

This is so funny _

On a side note, your site is not displayed correctly on IE6, the login and searchbox seems to be shifted.

14 Feb 2008, 7:37 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Weird error even with a skeleton

yellow1912:

I hope we are looking at the same url, which is:
http://www.totalgarage.ca/Products/index.php

This is so funny _

On a side note, your site is not displayed correctly on IE6, the login and searchbox seems to be shifted.

Yes, that's the URL I'm looking at too.

As for the shifted search/login, I see that as well. Also in FireFox2.
The shifting is likely a result of the error message being displayed still.

14 Feb 2008, 7:38 AM
#14
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Re: Weird error even with a skeleton

The link is correct...

and on the login... It used to be up in the header image.. I've moved it down, but haven't decided if I should hack the initial page to make space in the corner or if there is a better way of handling the placement of the login / search stuff....

14 Feb 2008, 7:40 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Weird error even with a skeleton

This is what I see in IE6

... the PHP Notice is a result of the DEBUG_AUTOLOAD line in the local/configure.php file.
When you're done with the autoload debugging, you can remove that line.

NOTE: Attachment removed

14 Feb 2008, 7:41 AM
#16
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Re: Weird error even with a skeleton

I've turned it back on again...

and also in configuation

<?php
  ini_set('display_errors', '1');
  define('STRICT_ERROR_REPORTING', true);
  define('DEBUG_AUTOLOAD',true);
  error_reporting(E_ALL | E_STRICT); 
?>

DrByte, does the site work for you in both FF2 and IE6 ?

14 Feb 2008, 7:43 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Weird error even with a skeleton

Site "works" in both browsers.
The IE example has fonts a bit large, which is usually a result of debug messages such as you currently have displayed.

In FF I don't see the PHP Notice/error.

14 Feb 2008, 7:48 AM
#18
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Weird error even with a skeleton

I dont understand anymore, FF shows me a blank page
IE7: Internet Explorer cannot display the webpage
IE6: blank
but unlike FF, the source code does have something though:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
14 Feb 2008, 7:49 AM
#19
quentinjs avatar

quentinjs

Zen Follower

Join Date:
Mar 2004
Location:
Calgary, Alberta
Posts:
289
Plugin Contributions:
0

Re: Weird error even with a skeleton

If it was just me, I'd believe you.... well I do.. but that still doesn't help me, as I'm not the only one with is.. yellow1912 has it too...

Now why would it not work for some browsers and work for others.... Because I just checked my IE and its the latest version and it don't like it...

Wonder if there is another tool out there that I can use.....

14 Feb 2008, 7:52 AM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Weird error even with a skeleton

Well, rather than worrying about whether or why one browser displays debug code or not, why not focus on your earlier goal of getting the addon code working.

Re-upload the auto_loader file, and upload the "real" class file, not your modified skeleton one.