Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2014
    Location
    Birmingham, Alabama
    Posts
    10
    Plugin Contributions
    0

    cart error bof-branding display code is generating broken links on all (423) pages of my cart.

    Hello,
    My site is http://thecolorsofbagleys.com/. The URL to my Zen Cart is http://thecolorsofbagleys.com/PROFISHCO/. I am using version v1.3.9h.

    I've run a Site Analysis Report with Microsoft's Internet Information Services (IIS) Manager and it's showing a multitude of problems that are being created by Zen Cart. The most serious would likely be the 423 broken links this error message points to:

    The Web page contains the broken link 'http://thecolorsofbagleys.com/PROFISHCO/includes/templates/profishco_default/images/'.

    being generate by the bof-branding display code that points to my logo image found here:

    http://thecolorsofbagleys.com/PROFIS...tpl_header.php

    and here:

    http://thecolorsofbagleys.com/PROFIS...tpl_header.php

    starting on line 68. I believe this is the code causing the problem:

    <!--bof-branding display-->
    <div id="logoWrapper">
    <div id="logo"><?php echo '<a href="http://thecolorsofbagleys.com">'.zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>

    If tried replacing 'images' with 'images/thecolorsofbagleys10.png' but a link to images/thecolorsofbagleys10.png/ is then created which is also a broken link.

    Next I tried taking the (. '/') out of the code thinking it was what was generating the unwanted forward slash but it didn't stop the forward slash from being added on. The page and logo still displayed properly however.

    Finally I tried taking (. '/' .) out of the code, but none of the pages on my site would then display, and I get an error message when I try to access them.

    I'm completely at a loss how to fix this problem, and I realize I might be completely off track tinkering with the code, but there is little doubt 423 broken links is going to be a huge drag on rankings for any site, and I had to try something. Any help would be greatly appreciated.

    Thanks,
    Mike Metzler
    The Colors of Bagley's
    http://thecolorsofbagleys.com/
    Last edited by colorsguy; 10 May 2014 at 04:56 PM.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: bof-branding display code is generating broken links on all (423) pages of my car

    Why have you altered the stock code?
    Code:
    <!--bof-branding display-->
    <div id="logoWrapper">
    <div id="logo"><?php echo '<a href="http://thecolorsofbagleys.com">'.zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
    It should be
    Code:
    <!--bof-branding display-->
    <div id="logoWrapper">
        <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
    <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
        <div id="taglineWrapper">
    <?php
                  if (HEADER_SALES_TEXT != '') {
    ?>
    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2014
    Location
    Birmingham, Alabama
    Posts
    10
    Plugin Contributions
    0

    Default Re: bof-branding display code is generating broken links on all (423) pages of my car

    I kept tinkering with the code until I was able to fix the problem. Here is the code that doesn't spit out broken links to my site logo:

    <!--bof-branding display-->
    <div id="logoWrapper">
    <div id="logo"><?php echo '<a href="http://thecolorsofbagleys.com">'.zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images/thecolorsofbagleys10.png'). '' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>

    I added the file name of the logo image which resides in the "image" directory referenced in the line of code. I then deleted the forward slash between this part of the code: . '/' . so it now looks like this . '' .

    Apparently that code was dynamically generating the forward slash.

    I've rerun a Site Analysis Report with Microsoft's Internet Information Services (IIS) Manager and the 423 broken links are now fixed. Now I need to address the 990 unnecessary redirects that are somehow being generated. I guess I should start another thread for that problem

    I hope this has been of some use to someone else.

    Mike

  4. #4
    Join Date
    May 2014
    Location
    Birmingham, Alabama
    Posts
    10
    Plugin Contributions
    0

    Default Re: bof-branding display code is generating broken links on all (423) pages of my car

    Quote Originally Posted by kobra View Post
    Why have you altered the stock code?
    Code:
    <!--bof-branding display-->
    <div id="logoWrapper">
    <div id="logo"><?php echo '<a href="http://thecolorsofbagleys.com">'.zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
    It should be
    Code:
    <!--bof-branding display-->
    <div id="logoWrapper">
        <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
    <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
        <div id="taglineWrapper">
    <?php
                  if (HEADER_SALES_TEXT != '') {
    ?>
    kobra,
    It's hard to say since it's been at least a couple of years since I set up the cart. I can only guess it was from following an online tutorial on adding my site logo to the cart, or it might have been because of info I found in a book I purchased online to help me set the program up. I do know I would never take out this line of code (. HTTP_SERVER . DIR_WS_CATALOG . '">') on my own. I have taught myself everything about building websites through reverse engineering and online tutorials, but taking a chunk of code out like would seem a bit suicidal to me.
    Mike

  5. #5
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: bof-branding display code is generating broken links on all (423) pages of my car

    No, your problem was that in your language file you set the define for HEADER_LOGO_IMAGE to blank, thus causing all the broken links. Better to have left the tpl_header file alone, and just fix the language file to have the correct image filename defined.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    May 2014
    Location
    Birmingham, Alabama
    Posts
    10
    Plugin Contributions
    0

    Default Re: bof-branding display code is generating broken links on all (423) pages of my car

    Quote Originally Posted by DrByte View Post
    No, your problem was that in your language file you set the define for HEADER_LOGO_IMAGE to blank, thus causing all the broken links. Better to have left the tpl_header file alone, and just fix the language file to have the correct image filename defined.
    My hack seems to be working without causing any problems, so I guess I'm going to leave well enough alone for the time being. I could definitely use some help on some of the other problems Internet Information Services (IIS) Manager is finding though. Like this warning I'm getting 143 times:

    The redirection response results in another redirection.

    here is an example IIS is giving me:

    The link to "http://thecolorsofbagleys.com/PROFISHCO/tell_a_friend/bagley-d5s-frg" has resulted in a redirection to "http://thecolorsofbagleys.com/PROFISHCO/login" which resulted in another redirection. Search engines can only pass page rankings and other relevant data through a single redirection hop. Using unnecessary redirects can have a negative impact on page ranking.

    Tell a friend was causing some other errors so I disabled it. Zen Cart's default action is to redirect to the login page, which is what they tell you will happen if you cut the feature off. I'm in a "damned if you do, damned if you don't" situation here because I get errors if the feature is cut on, and also if I cut if off.

    I'm also getting 837 unnecessary redirect warnings like this one:

    The link to "http://thecolorsofbagleys.com/PROFISHCO/login" has resulted in HTTP redirection to "http://thecolorsofbagleys.com/PROFISHCO/cookie_usage".
    Search engines can only pass page rankings and other relevant data through a single redirection hop. Using unnecessary redirects can have a negative impact on page ranking.

    Is there any way to clean up the redirects?

    Thanks for everyone's time!
    Mike

  7. #7
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: bof-branding display code is generating broken links on all (423) pages of my car

    One way would be to upgrade to version 1.5.1, from which the Tell-A-Friend function was removed.

  8. #8
    Join Date
    May 2014
    Location
    Birmingham, Alabama
    Posts
    10
    Plugin Contributions
    0

    Default Re: bof-branding display code is generating broken links on all (423) pages of my car

    Quote Originally Posted by stevesh View Post
    One way would be to upgrade to version 1.5.1, from which the Tell-A-Friend function was removed.
    Now that's a scary thought, thinking about transferring my hacks to a new version ;)

  9. #9
    Join Date
    May 2014
    Location
    Birmingham, Alabama
    Posts
    10
    Plugin Contributions
    0

    Default Re: bof-branding display code is generating broken links on all (423) pages of my car

    Quote Originally Posted by stevesh View Post
    One way would be to upgrade to version 1.5.1, from which the Tell-A-Friend function was removed.

    I was able to find this advice from clydejones that fixed my "tell a friend" problem:

    Re: remove "review product" and "tell a freind" buttons

    Turn them off in:

    admin -> catalog -> product types -> product general (click the edit layout button and turn them off set to 0)

    When there is no button, there is no redirect. This got rid of 285 of my errors.

    Mike

  10. #10
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: bof-branding display code is generating broken links on all (423) pages of my car

    Sounds like something amuck with your URL-rewriting customizations.
    Zen Cart 1.3.9 doesn't generate URLs that look like ..../PROFISHCO/login or ..../PROFISHCO/tell_a_friend/bagley-d5s-frg

    When suffering from redirections taking you in circles, turning off the redirecting stuff is the first place to start until you sort out the why. And sometimes the bug is actually in the redirect/rewrite customizations. Quite often actually.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Code to display Manufacturers Name in Shopping Cart and Checkout Conf pages
    By Twobears in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Sep 2012, 09:29 PM
  2. All Links Broken
    By Craig Robbo in forum General Questions
    Replies: 16
    Last Post: 5 Jan 2009, 05:56 PM
  3. All the links are broken
    By Chubacheroo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Aug 2008, 10:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR