Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

searching vor source of display "bug" in firefox


abra123cadabra

Recommended Posts

Posted

Hi @all,

 

I have been working on the header, footer and index pages, trying to seperate markup from presentation and reducing the amount of tables nested within each other.

 

It's slow but I think I get where I want to go. Now I have a little problem with this page here: http://www.finefoods24.com/catalog/index.php

 

IE 6, NS 8.1 (as IE) and Opera 8.53 are displaying the page just fine.

Firefox 1.5 and NS 8.1 (as Firefox) display --> underneath the breadcrumbtrail. This seems to be some leftover from a comment but I cannot find it anywhere in the code.

 

If someone could at least point me to the location in the browser-html-source-code, then I would probably be able to locate the error (in the php parts or just in the html). Any help is much appreciated. Tell me, if you need more info.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Posted
Hi @all,

 

I have been working on the header, footer and index pages, trying to seperate markup from presentation and reducing the amount of tables nested within each other.

 

It's slow but I think I get where I want to go. Now I have a little problem with this page here: http://www.finefoods24.com/catalog/index.php

 

IE 6, NS 8.1 (as IE) and Opera 8.53 are displaying the page just fine.

Firefox 1.5 and NS 8.1 (as Firefox) display --> underneath the breadcrumbtrail. This seems to be some leftover from a comment but I cannot find it anywhere in the code.

 

If someone could at least point me to the location in the browser-html-source-code, then I would probably be able to locate the error (in the php parts or just in the html). Any help is much appreciated. Tell me, if you need more info.

 

abra

 

your source code is riddled with incomplete comments:

 

<!-- body_text_eof //-->
<!-- ********** do not show right column - ulrike ********** -->
<!--
<td width="" valign="top"><table border="0" width="" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<!-- right_navigation_eof //-->
<!--	</table></td>
 </tr>

-->
<!-- ********** end do not show right column ********** -->

 

the html output file in /includes also deletes certain comments.

 

use /* and */ or // to comment out code in PHP

 

dreamweaver will colour annotate correctly out-commented code for you....

Posted
your source code is riddled with incomplete comments:

 

<!-- body_text_eof //-->
<!-- ********** do not show right column - ulrike ********** -->
<!--
<td width="" valign="top"><table border="0" width="" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<!-- right_navigation_eof //-->
<!--	</table></td>
 </tr>

-->
<!-- ********** end do not show right column ********** -->

 

the html output file in /includes also deletes certain comments.

 

use /* and */ or // to comment out code in PHP

 

dreamweaver will colour annotate correctly out-commented code for you....

 

Hi Skylla,

 

I'm using PHP Designer which also colour codes comments etc. but obviously this bit is still messed up and to be honest, I had problems with the different types of comments for HTML and PHP anyway. Could you please have another look at my source code:

 

<!-- body_text_eof //-->
<!-- ********** do not show right column - ulrike ********** -->
<!--
<td width="<?php // echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php // echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php // require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
<!--	</table></td>
 </tr>
-->
<!-- ********** end do not show right column ********** -->

 

All this should be commented out but I seem to miss the bit that still shows.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Posted

Oh my word...

 

the deeper I dig into this whole XHML, CSS thing the worse it gets.

 

It all started with exchanging some table tags for divs. All fine, till I checked the display in NS (as Firefox) to find that the layout was out of shape.

 

Googled a bit to find doctype switching responsible for this issue. Decided to change the definition from HTML 4.01 transitional WITHOUT LINK to HTML 4.01 transitional WITH link to get rid of the quirky display in some browser versions.

 

Obviously this change now triggers Firefox to adhere strict to standard mode, punishing me with showing this leftover comment....

 

I cannot tell you how much I hate this browser incompatibility. Only since IE 6 is not working properly on my system any more (had to install an alternative) I am aware of all these little differences.

 

Would anyone be so kind to tell me how and which comment type I use for mixed HTML/PHP code (as above)? I'm not clear about when and where I need to put which tag.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Posted

<!-- <td width="<?php // echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php // echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

Found the little bugger....

 

This line is missing the closing HTML comment tag. Everything else was fine.

 

Well, let's get started to add this bit to all other 50 or so pages.... While I'm at it I can also change the doctype to prevent the other pages to be displayed in some weird way.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Posted

I see what you're trying to do now. Note that it is not a good idea to wrap HTML comments within HTML comments unless you're targeting a subset of browsers which will interpret this (in)correctly due to quirks mode..

 

e.g <!-- xx <!-- vv --> --> can be interpreted as a single, lonely closing --> comment!

 

However, it is indeed neccesary to comment out PHP code with // within HTML comments.

 

 

A couple of links:

 

http://www.oscommerce.com/forums/index.php?showtopic=105488

 

and from the "code is poetry" website:

 

http://managedtasks.com/wpthemes/blog/2005...omment-php-code or

 

http://codex.wordpress.org/Commenting_Code

Posted
I see what you're trying to do now. Note that it is not a good idea to wrap HTML comments within HTML comments unless you're targeting a subset of browsers which will interpret this (in)correctly due to quirks mode..

 

e.g <!-- xx <!-- vv --> --> can be interpreted as a single, lonely closing --> comment!

 

However, it is indeed neccesary to comment out PHP code with // within HTML comments.

A couple of links:

 

http://www.oscommerce.com/forums/index.php?showtopic=105488

 

and from the "code is poetry" website:

 

http://managedtasks.com/wpthemes/blog/2005...omment-php-code or

 

http://codex.wordpress.org/Commenting_Code

 

 

Thanks again!

 

Googling I also found the wordpress link. So basically you comment out each HTML segment without nesting comments into each other. PHP code within a HTML part has to be commented out seperately.

 

This is exactly what I did now and surprise: it works fine.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Posted
Thanks again!

 

Googling I also found the wordpress link. So basically you comment out each HTML segment without nesting comments into each other. PHP code within a HTML part has to be commented out seperately.

 

This is exactly what I did now and surprise: it works fine.

 

abra

 

Nesting is the correct word indeed :) , not all browsers are happy with that

Posted

Nesting is the correct word for that indeed :) , not all browsers are happy with that

 

Edit: Also don't forget that the HTML comments can be browser viewed in source code, so don't leave any sensitive comments for your audience (or insensitive for that matter!!)

Posted

When I started with my "cleaning" and adding contributions I got a bit confused with the comments and basically put every comment in between php tags. Maybe a good way to hide sensitive infos.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Archived

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

×
×
  • Create New...