Guest Posted October 15, 2006 Posted October 15, 2006 Hi everyone, My page has been coming along quite well but there seems to be a bug which will sometimes squash my page! for example in the product listing page and then what it looks like normally: This seems weird as it doesnt happen all the time! please let me know if you would like to see the live page or my source code. Thanks for your help in advance Matt
ledger Posted October 16, 2006 Posted October 16, 2006 I am having a similar problem. And have not resolved it yet. When the page is not displaying correctly if you view the source are there tags missing. When the page is not displaying correctly Does a refresh of the page correct the alignment? Regards Ryan Ledgerwood
ComicWisdom Posted October 16, 2006 Posted October 16, 2006 What you have here is one of the hardest and time consuming errors to try tolocate. However, I can give you some clues. Take a good look at your pages as displayed normally and squashed. Here is your nomal page: Here is your squsahed page: Display the pages squashed page in your browser. Find those characters. Reference them by some non-moveable text near them such as <!--new product starts here//-->. Open index.php and search for the nonmoveable text then look closely to find the characters.. By the location of them on your page, don't be surprised if you find them very near the bottom of the index.php file outside of a main table but still inside the body. Good luck. Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!! Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience. The quickest way to learn is to forget to BACKUP!
ComicWisdom Posted October 16, 2006 Posted October 16, 2006 What you have here is one of the hardest and most time consuming errors to try to locate. There is an error in your code that runs only on condition. However, I can give you some clues. Take a good look at your pages as displayed normally and squashed. Here is your nomal page: Here is your squsahed page: Note the characters in the circle. They are the culprits. Display the pages squashed page in your browser. Find those characters. Reference them by some non-moveable text near them such as <!--new product starts here//-->. Open index.php and search for the nonmoveable text then look closely to find the characters.. By the location of them on your page, don't be surprised if you find them very near the bottom of the index.php file outside of a main table but still inside the body. Good luck. Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!! Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience. The quickest way to learn is to forget to BACKUP!
Guest Posted October 26, 2006 Posted October 26, 2006 OK I followed your instructions.. but the strange thing is that the code is within a table and in the correct position when its squashed! I went as far as to comparing the two index.php files using winmerge - and there is no difference whatsoever within the files! A quick 'F5' refresh fixes it but this is very annoying and i dont expect customers to know how to do this. here is a snippit of the code where the problem is: <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListing"> <tr> <td align="center" class="productListing-heading"> </td> <td class="productListing-heading"> <a href="http://www.revert.com.au/test/catalog/index.php?cPath=23_35&page=1&sort=2d" title="Sort products descendingly by Product Name" class="productListing-heading">Product Name+</a> </td> <td align="right" class="productListing-heading"> <a href="http://www.revert.com.au/test/catalog/index.php?cPath=23_35&page=1&sort=3a" title="Sort products ascendingly by Price" class="productListing-heading">Price</a> </td> <td align="center" class="productListing-heading"> Buy Now </td> </tr> <tr class="productListing-odd"> <td align="center" class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=52"><img src="images/loc_truck_lg.jpg" border="0" alt="LOC Trucks" title=" LOC Trucks " width="100" height="66.666666666667"></a> </td> <td class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=52">LOC Trucks</a> </td> <td align="right" class="productListing-data"> <span class=currency_symbol>$</span>35.00<span class=currency_symbol></span> </td> <td align="center" class="productListing-data"><a href="http://www.revert.com.au/test/catalog/index.php?cPath=23_35&sort=2a&action=buy_now&products_id=52"><img src="includes/languages/english/images/buttons/button_buy_now.gif" border="0" alt="Buy Now" title=" Buy Now " width="80" height="23"></a> </td> </tr> <tr class="productListing-even"> <td align="center" class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=54"><img src="images/streettruc_blk_lg.jpg" border="0" alt="Urbansk8er Street Demon Black" title=" Urbansk8er Street Demon Black " width="100" height="41.666666666667"></a> </td> <td class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=54">Urbansk8er Street Demon Black</a> </td> <td align="right" class="productListing-data"> <span class=currency_symbol>$</span>30.00<span class=currency_symbol></span> </td> <td align="center" class="productListing-data"><a href="http://www.revert.com.au/test/catalog/index.php?cPath=23_35&sort=2a&action=buy_now&products_id=54"><img src="includes/languages/english/images/buttons/button_buy_now.gif" border="0" alt="Buy Now" title=" Buy Now " width="80" height="23"></a> </td> </tr> <tr class="productListing-odd"> <td align="center" class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=55"><img src="images/streettruc_blu_lg.jpg" border="0" alt="Urbansk8er Street Demon Blue" title=" Urbansk8er Street Demon Blue " width="100" height="43.5"></a> </td> <td class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=55">Urbansk8er Street Demon Blue</a> </td> <td align="right" class="productListing-data"> <span class=currency_symbol>$</span>30.00<span class=currency_symbol></span> </td> <td align="center" class="productListing-data"><a href="http://www.revert.com.au/test/catalog/index.php?cPath=23_35&sort=2a&action=buy_now&products_id=55"><img src="includes/languages/english/images/buttons/button_buy_now.gif" border="0" alt="Buy Now" title=" Buy Now " width="80" height="23"></a> </td> </tr> <tr class="productListing-even"> <td align="center" class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=56"><img src="images/streettruc_red_lg.jpg" border="0" alt="Urbansk8er Street Demon Red" title=" Urbansk8er Street Demon Red " width="100" height="42.5"></a> </td> <td class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=56">Urbansk8er Street Demon Red</a> </td> <td align="right" class="productListing-data"> <span class=currency_symbol>$</span>30.00<span class=currency_symbol></span> </td> <td align="center" class="productListing-data"><a href="http://www.revert.com.au/test/catalog/index.php?cPath=23_35&sort=2a&action=buy_now&products_id=56"><img src="includes/languages/english/images/buttons/button_buy_now.gif" border="0" alt="Buy Now" title=" Buy Now " width="80" height="23"></a> </td> </tr> <tr class="productListing-odd"> <td align="center" class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=53"><img src="images/streettruc_lg.jpg" border="0" alt="Urbansk8er Street Demon Silver" title=" Urbansk8er Street Demon Silver " width="100" height="39.333333333333"></a> </td> <td class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=53">Urbansk8er Street Demon Silver</a> </td> <td align="right" class="productListing-data"> <span class=currency_symbol>$</span>25.00<span class=currency_symbol></span> </td> <td align="center" class="productListing-data"><a href="http://www.revert.com.au/test/catalog/index.php?cPath=23_35&sort=2a&action=buy_now&products_id=53"><img src="includes/languages/english/images/buttons/button_buy_now.gif" border="0" alt="Buy Now" title=" Buy Now " width="80" height="23"></a> </td> </tr> <tr class="productListing-even"> <td align="center" class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=57"><img src="images/streettruc_silBlk_lg.jpg" border="0" alt="Urbansk8er Street Demon Silver/Black" title=" Urbansk8er Street Demon Silver/Black " width="100" height="40.166666666667"></a> </td> <td class="productListing-data"> <a href="http://www.revert.com.au/test/catalog/product_info.php?cPath=23_35&products_id=57">Urbansk8er Street Demon Silver/Black</a> </td> <td align="right" class="productListing-data"> <span class=currency_symbol>$</span>30.00<span class=currency_symbol></span> </td> <td align="center" class="productListing-data"><a href="http://www.revert.com.au/test/catalog/index.php?cPath=23_35&sort=2a&action=buy_now&products_id=57"><img src="includes/languages/english/images/buttons/button_buy_now.gif" border="0" alt="Buy Now" title=" Buy Now " width="80" height="23"></a> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText">Displaying <b>1</b> to <b>6</b> (of <b>6</b> products)</td> <td class="smallText" align="right">Result Pages: <b>1</b> </td> </tr> </table> </td> </tr> </table></td> <!-- body_text_eof //--> What you have here is one of the hardest and most time consuming errors to try to locate. There is an error in your code that runs only on condition. However, I can give you some clues. Take a good look at your pages as displayed normally and squashed. Here is your nomal page: Here is your squsahed page: Note the characters in the circle. They are the culprits. Display the pages squashed page in your browser. Find those characters. Reference them by some non-moveable text near them such as <!--new product starts here//-->. Open index.php and search for the nonmoveable text then look closely to find the characters.. By the location of them on your page, don't be surprised if you find them very near the bottom of the index.php file outside of a main table but still inside the body. Good luck.
squeekit Posted October 26, 2006 Posted October 26, 2006 you can TRY this.... open your index.php (from shops main folder) to edit... around line 228 (about two thirds down) change: <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> to: <td width="*%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> within the above code sample, changing the first TD's width from "100%" to "*%" is telling that TD to fill the rest of the table's width (that's what *% means) --- being that the left nav TD already takes up some of the table's width, technically speaking the next TD over should not have a width of 100% - and so the above edit is meant to remedy that... IF you still have problems, or simply desire even more page display control then you can also do the following - which should give you a permentent fix for all broswers... [ not the greatest fix - but sure to work ] open your includes/modules/product_listing.php to edit... around line 70 (about one third down) change: $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); to: $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => '<nobr> ' . $lc_text . ' </nobr>'); $lc_text receives the heading titles and surrounding it with <nobr>...</nobr> displays the text (the heading titles) without line breaks... just curious - were the screenshots from a firefox browser?
Guest Posted October 26, 2006 Posted October 26, 2006 Hi squeekit - thanks for this - will try it in the morning and let u know how it goes! PS yes it was firefox - i also realised today that i cant replicate in IE. not sure if this means it is firefox only bug tho.. :) thanks for your help Regards Matt
squeekit Posted October 26, 2006 Posted October 26, 2006 not sure if this means it is firefox only bug tho.. :) yes AND no... not really a display bug in firefox to start with - being that it is trying to render faulty html - where for example a table has a main width that is either fixed or percent and then later within one row tries to establish a TD with a fixed width then another TD next to it with a width of 100% - this is faulty html example - basically it boils down to this: <table width="100%"> <tr> <td width="125">some content</td> <td width="100%">some content</td> </tr> </table> However - once you change the second TD width to "*%" and find you are still having trouble then indeed you are running into what i have found to be one of firefox's main display bugs (the handling of container dimensions improperly)... another (just curious) question: did you add "line-height" to productListing-heading in your stylesheet - just wondered?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.