ledger Posted October 10, 2006 Posted October 10, 2006 Im New to osCommerce. I have new install of OSC everything seems correct but I am having alignment problems with the home page. Things look correct with the default data but after removing the product attributes and product specials the missalignment become visable. I have a fresh install loaded currently and the home page looks correct but if you copy the source to an html editor there are missing tags. With the default data and default index.php the source of the page has a missing </a> on the oscommerce image (7 lines from the bottom). It does contain the </ but not the 'a>' This becomes more evident when new data is loaded and the specials are removed. View Source shows this line 7 from the bottom (notice the </) missing 'a>' <td align="center"><a href="http://www.netvistore.com/redirect.php?action=banner&goto=1&osCsid=3371f14389f788999a0e835e44686b5f" target="_blank"><img src="images/banners/oscommerce.gif" border="0" alt="osCommerce" title=" osCommerce " width="468" height="50"></</td> This problem only appears if you open a new browser window and go to the site. Strangely if you refresh the page all tags appear and alignment is correct. Is this a known problem or perhaps an issue with virtual hosting on my Redhat 9 box? runing OSC 2.2 ms2. site is at www.netvistore.com Best Regards Ryan Ledgerwood
hookupz Posted October 10, 2006 Posted October 10, 2006 Unless you already fixed it I do not see any error in the alignment of anything on your OSC install. not sure why it would not have shown the </a>, maybe it was a glitch in the display of your code.
ledger Posted October 11, 2006 Author Posted October 11, 2006 Thanks for the quick reply Hookupz. I have not changed anything. I have several different pcs to test with and all show the same. The key to see the problem is (it is not visible by veiwing the page, only in the source) Open a new browser window... I have used IE and Netscape type url www.netvistore.com Without doing any type of refresh or navigation... view the source. 7 lines from the bottom of the source file there will be an a href without a closeing tag. Noted in previous post. Hookupz, is this what you did? Id sleep well if it was a problem on the client side but I have used so many different terminals... (at different locations) Things get really bad when I start to change any of the data... Also the refresh of the page corrects any problems... Thanks again for taking the time to view the page. This is a very important project for me... Best Regards Ryan Ledgerwood
squeekit Posted October 11, 2006 Posted October 11, 2006 yes ledger, i see what you're talking about - very very odd --- here's the scoop... that whole area gets controlled by includes/footer.php - in particular that link with the faulty "</a>" is generated by a function the footer.php calls - which is "tep_display_banner" within includes/functions/banner.php - that function ("tep_display_banner" within includes/functions/banner.php) should look like this: //// // Display a banner from the specified group or banner id ($identifier) function tep_display_banner($action, $identifier) { if ($action == 'dynamic') { $banners_query = tep_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'"); $banners = tep_db_fetch_array($banners_query); if ($banners['count'] > 0) { $banner = tep_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'"); } else { return '<b>TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</b>'; } } elseif ($action == 'static') { if (is_array($identifier)) { $banner = $identifier; } else { $banner_query = tep_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . (int)$identifier . "'"); if (tep_db_num_rows($banner_query)) { $banner = tep_db_fetch_array($banner_query); } else { return '<b>TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</b>'; } } } else { return '<b>TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</b>'; } if (tep_not_null($banner['banners_html_text'])) { $banner_string = $banner['banners_html_text']; } else { $banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>'; } tep_update_banner_display_count($banner['banners_id']); return $banner_string; } note the last "</a>" (near the bottom of that function) - that's the one you are not generating properly... let me know if your function looks like the above - if it does then we'll look for other causes -- but indeed that is the "</a>" in question...
ledger Posted October 11, 2006 Author Posted October 11, 2006 Thanks sqeekit Very good info, I do need to know more about the process of the package!! Function looks the same... I will check it in more detail but 99% sure it ths same. Could this problem be outside of osc (virtual hosting)? any ideas why a page refresh corrects the problem? Also if I go to the site (with a new browser window) the tag is missing. but then navigate to a category then navigate back to the root by using the 'top' link all is correct. I can also open a new browser window navigate to site, Check source (missing tag) leave the site via IE address bar... Come back via address bar and all is correct... Could this be a problem with a cookie... or something else that is processed on a first time entry to the site? this is pretty much a stock redhat 9 install... Apache, PHP, mysql, sendmail Any Ideas? Ryan Ledgerwood
squeekit Posted October 11, 2006 Posted October 11, 2006 how odd -- i notice what your saying... and, well, how odd, i think in some really offhand way it might relate to your session cookies -- maybe not directly - but when first entering the page (with "</" error) i notice &osCsid=SOME-ID-NUMBER-THINGY but reloading page and "</a>" gets fixed and there's no &osCsid=SOME-ID-NUMBER-THINGY ... At this time you might have indeed found a bug that no one has noticed (to my knowledge) --- i recommend following the steps it tells you to do (1 thru 3 - you're already doing 4 ;) )... let's see if the problem persists --- here's my thinking > there might be some minor syntax error in the default text or something about first arriving at a new install that's throwing off the thing ("</a>")... still very odd - perhaps someone will show up that knows all about this event and share (yes i'm hopeful) - i don't think it has to do with your server... just FYI - this is the default includes/footer.php (complete): <?php /* $Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require(DIR_WS_INCLUDES . 'counter.php'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="footer"> <td class="footer">??<?php echo strftime(DATE_FORMAT_LONG); ?>??</td> <td align="right" class="footer">??<?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>??</td> </tr> </table> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td> </tr> </table> <?php if ($banner = tep_banner_exists('dynamic', '468x50')) { ?> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"><?php echo tep_display_banner('static', $banner); ?></td> </tr> </table> <?php } ?>
squeekit Posted October 11, 2006 Posted October 11, 2006 hmmm - this is a brain teaser -- i just looked at the default text for index and didn't see any real issues - in includes/languages/english/index.php TEXT_MAIN is defined as follows: 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.</td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Editing Page Texts</b><br><br>The text shown here can be modified in the following file, on each language basis:<br><br><nobr class="messageStackSuccess">[path to catalog]/includes/languages/' . $language . '/' . FILENAME_DEFAULT . '</nobr><br><br>That file can be edited manually, or via the Administration Tool with the <nobr class="messageStackSuccess">Languages->' . ucfirst($language) . '->Define</nobr> or <nobr class="messageStackSuccess">Tools->File Manager</nobr> modules.<br><br>The text is set in the following manner:<br><br><nobr>define(\'TEXT_MAIN\', \'<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>\');</nobr><br><br>The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:<br><br><nobr>define(\'TEXT_MAIN\', \'\');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define" target="_blank"><u>here</u></a>.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b>Securing The Administration Tool</b><br><br>It is important to secure the Administration Tool as there is currently no security implementation available.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . '</td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://www.oscommerce.info" target="_blank"><u>osCommerce Knowledge Base</u></a> site.<br><br>Community support is available at the <a href="http://www.oscommerce.com/forums" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><br>If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the <a href="http://www.oscommerce.com" target="_blank"><u>support site of osCommerce</u></a>. This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.' i don't think there's anything to see in the above still i'd first give it a test and modify it as: define('TEXT_MAIN', ''); see what happens... ----- oh yeah - earlier when i referred to &osCsid= i meant its presence in the footer's banner link...
squeekit Posted October 11, 2006 Posted October 11, 2006 one last note for now --- i said no real issues -- but indeed there are issues like: </td></tr><td class="main" valign="top"> when if they are going to bust into the table it should be: </td></tr><tr><td class="main" valign="top"> other things as well -- but nothing that really explains that "</" concretely - at least without testing... ---i've gottin rid of that area of the footer in all my shop designs -- at most i leave the bottom 'bar' and pop info/links in that --- as well i like to keep it at the bottom of the page by table-ing everything at a height of 100% - then fix height the header - asign height="*%" for main body cell - then finally fix height the footer this keeps the footer at the bottom of the page even when the main content doesn't extend all the way to the bottom ;)
ledger Posted October 13, 2006 Author Posted October 13, 2006 I have been looking into anything other than the oscommerce setup. I have mentioned virtual hosting in a previous post... I run the info.php general script and noticed only one thing.. There is a section on virtual directory support... It is disabled.. Could this be a problem... Does OSC need this enabled.. Any info on this would be appriciated Best Regards Ryan Ledgerwood
Recommended Posts
Archived
This topic is now archived and is closed to further replies.