Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

redeclare error when moved "column_left.php" into header


lindsayanng

Recommended Posts

Posted

So at first, i thought there was some type of function duplicated by an addon when I moved the ENTIRE column_left.php from the index.php to the header.php. Now i am 100% sure that its NOT the addon and its the movement of the column that is causing this. I am pretty good with tweaking things in osc, but not 100% familiar with all of the functions that go on using the boxes.

 

So here is what I have done and the conclusions I have come to.

 

First I thought it was an addon error because I got the error "can not redeclare printsubmenu" which is an function specific to the categories addon. This error happen on EVERY page except the product_listing.php page. THOSE pages show just fine..

 

So I removed the addon and used the stock oscommerce categories menu just to see if it would work.. nope.. Now i get a different error. THIS is the error:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/bscphoto/public_html/catalog/includes/boxes/categories.php:13) in /home/bscphoto/public_html/catalog/includes/boxes/categories.php on line 13

 

This is basically the same error as before, but a different function. it will show the product_listing.php but not ANY other page.. even pages that have NOTHING to do with the categories box.. WHAT in the world is happening?

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

(\M/)

/°V°\

 

A couple of things.

 

Have you looked at the site using IE lately (I bet you use Firefox)?

:unsure:

 

You won't like what you see...

:blush:

 

On your login page I get the "unsecure items" popup in IE.

 

A "hard coded" http link to an image:

 

<div id="left"><img src="http://bscphoto.com/bsc_logo.jpg" /><br>

I think the HTML source to the login page provides a clue to the problem:

 

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<br />
<b>Fatal error</b>:  Cannot redeclare tep_show_category() (previously declared in /home/bscphoto/public_html/catalog/includes/boxes/categories.php:13) in <b>/home/bscphoto/public_html/catalog/includes/boxes/categories.php</b> on line <b>13</b><br />

Looks like you forgot to "comment out" the call to the column_left later on in the PHP code there.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

yea. i JUST JUST JUST figured that out.. I am in the process of going through and removing all of the calls for COLUMN_LEFT.php I did not realize that each section inside of the index had calls for that.. I always thought of the index page as containing the "template" pieces like the columns, header and footer.. In the process of changing it now.

 

As far as IE, what side of the site are you looking at?? The catalog side or the portfolio side?? I KNOW the portfolio side is nutty.. can you post a screen shot of what you are seeing.. why does IE hate me?

 

I just hardcoded the image just because I was working on the LOOK and wanted to clean up the hardcoding as soon as I get it working..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

It's the catalog page.

 

I really can't post a screenshot.

 

The header is aligned vertically, and it would take at least TWO screen dumps to get it all...

:o

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

I just went over to browser shots.. SHITTY (dont mind my french)

 

I dont understand though.. i did this in a way that my page worked in ALL browsers from here:

 

weddings page

 

THAT should look good on all browsers..

 

And ideas as to why the main content is NOT aligning properly in IE ??? safari seems to "get it" as well.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

I'd have to "doodle" with the code.

 

The Firefox error panel shows several errors.

 

This javascript error appears TWICE:

 

if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)  */

Get rid of the */

 

In the stylesheet:

 

infoBox {
 background: #000000
 border: 1px;
}

(Missing a ; after #000000)

 

#nav li:hover > {color:#c00;}

(The > shouldn't be there I think)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

yea.. that was me playing with the java for the menu. For some reason, the menu on the left is not seeing the javascript in categories_css.php (the addon's file) So i tried to put it in a few places to see if it would see it here..

 

Basically, to fix my ORIGINAL problem, I moved the functions from categories_css.php to the functions/general.php so that they can all see the same function from the same file.. genius right?? Well, that worked perfectly, but now it is not seeing the javascript that is in the categories_css.php fors ome odd reason.. not a major concern right now..

 

I think right now my MAJOR concern is the stupid IE Problem.. can you check it again.. I added a display:inline to the left and right column so it knows to put the side by side and not one on top of each other.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

No change - IE still sucks...

(Pardon MY French)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

our french.. I droppped the S bomb!!

 

I hate IE.. I think that the issue was that i did not specify a float maybe?? I mean, the code is VERY VERY simple for the div..

 

These are the basics for the code

 

styles:

#left{

float:left;

left:0px;

width:184px;

display:inline;

}

#right {

float:right;

left:184px;

top:24px;

width:766px;

display:inline;

}

 

#wrapper{

width:950px;

margin:auto;

border:1px;

padding-top: 43px;

padding-left:16px;

}

 

<div id="wrapper">
<div id="left">Contains logo and column_left.php</div>
<div id="right">contains navigation and everything else, including the footer</div>
</div>
</div>

 

 

The right div does not close until right after the footer container..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

my confusion is because i have this page here which has the EXACT same basic div layout:

wedding page

 

and that looks good to you right?> I checked it in browsershots.com and looks fine.. So why there is it ok.. and in the osc not?? Is it the combination of divs and tables?? i cant imagine a table would override a containing fixed div

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

Personally, I think it's a <table> problem.

 

I've copied the HTML source and have "doodled with it" and gotten it to look "better" with some added table elements.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

I hate mixing the two..

 

but hey, i think i did something REALLY stupid.. I just deleted a file called myenvy.php which i THOUGHT was a malicious file.. But now my entire site is FUBARed.. what the hel was that file..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

Yep.. It's FUBAR now...

:blush:

 

I haven't a clue what it was, but gosh I hope you have a backup...

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

yea.. I was deleting "myenvy.php" but stupid me didnt realize that I also had my osc style sheet checked.. I am restoring now.

 

Seriously though.. if you were to figure out the issue with the stupid tables.... i would love you forever...

p.s. i learned my lessons about backing up EVERYTHING I do, EVERY TIME

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

:wub:

 

:blush:

 

:rolleyes:

 

Well... Gee... With a promise like that, how can I resist?

:unsure:

 

:lol:

 

Seriously, I will work on it but probably won't come up with a cure until tomorrow evening (if at all).

 

I have to get up at 4 and I usually go to bed at 11 and it's already 10:30 here

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

haha.. cant i just flutter my eyelids and get stuff done for me?? Or am i getting to old for that??? i mean, 26.. am i THAT old already>?

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...