Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2008
    Posts
    21
    Plugin Contributions
    0

    Default [Done 1.3.9] noindex,nofollow mistakenly appears on home page in certain situation

    I'm not sure whether or not this is a bug ~ but it could certainly do some bugging!

    My store's home page has the line "<meta name="robots" content="noindex, nofollow" />". I did NOT put it there! I'm just glad I saw it while my store is still on my personal computer and not after months of wondering why search engines won't index my store's home page. I haven't seen this on any other pages but I am definitely going to look before my store goes live.

    Can anyone tell me what file I need to modify to change this? I can't find it.

    I'm also rather curious as to why it says this. If it's not a bug, what is the reason for it?
    Currently using version 1.3.9d

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Meta content problem

    There's a bug which only shows when you have
    Admin->Configuration->Layout Settings->Categories - Always Show on Main Page = 1

    To fix it, edit your /includes/init_includes/init_add_crumbs.php file, by adding the indicated code, as shown in the highlighted area:
    Code:
        if ($categories->RecordCount() > 0) {
          $breadcrumb->add($categories->fields['categories_name'], zen_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
        } elseif(SHOW_CATEGORIES_ALWAYS == 0) {
          // if invalid, set the robots noindex/nofollow for this page
          $robotsNoIndex = true;
          break;
        }
    .

    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.

  3. #3
    Join Date
    Jan 2008
    Posts
    21
    Plugin Contributions
    0

    Default Re: Meta content problem

    Thanks!
    Currently using version 1.3.9d

  4. #4
    Join Date
    Mar 2007
    Posts
    83
    Plugin Contributions
    0

    Default Re: Meta content problem

    Not being a programmer I have a dumb question should there be a space between the "else" and the "if" or does it not matter?

    Thanks
    Dave G

    Quote Originally Posted by DrByte View Post
    There's a bug which only shows when you have
    Admin->Configuration->Layout Settings->Categories - Always Show on Main Page = 1

    To fix it, edit your /includes/init_includes/init_add_crumbs.php file, by adding the indicated code, as shown in the highlighted area:
    Code:
        if ($categories->RecordCount() > 0) {
          $breadcrumb->add($categories->fields['categories_name'], zen_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
        } elseif(SHOW_CATEGORIES_ALWAYS == 0) {
          // if invalid, set the robots noindex/nofollow for this page
          $robotsNoIndex = true;
          break;
        }

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

    Default Re: [Done 1.4.0] noindex,nofollow mistakenly appears on home page in certain situatio

    Quote Originally Posted by Dave G View Post
    Not being a programmer I have a dumb question should there be a space between the "else" and the "if" or does it not matter?

    Thanks
    Dave G
    elseif and else if are acceptable as well

    So, to answer your question: it doesn't matter.
    .

    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
    Mar 2007
    Posts
    83
    Plugin Contributions
    0

    Default Re: [Done 1.4.0] noindex,nofollow mistakenly appears on home page in certain situatio

    Thanks
    I like learning a little bit each day, one day I'll be dangerous :-)

    Dave G

  7. #7
    Join Date
    Oct 2008
    Location
    Singapore
    Posts
    23
    Plugin Contributions
    0

    Default Re: [Done 1.4.0] noindex,nofollow mistakenly appears on home page in certain situatio

    Quote Originally Posted by keeping View Post
    I'm not sure whether or not this is a bug ~ but it could certainly do some bugging!

    My store's home page has the line "<meta name="robots" content="noindex, nofollow" />". I did NOT put it there! I'm just glad I saw it while my store is still on my personal computer and not after months of wondering why search engines won't index my store's home page. I haven't seen this on any other pages but I am definitely going to look before my store goes live.

    Can anyone tell me what file I need to modify to change this? I can't find it.

    I'm also rather curious as to why it says this. If it's not a bug, what is the reason for it?

    Hi Everyone,
    I have the same problem as Keeping, and my site has the "noindex, nofollow" thing on my meta tags. In another post, i mentioned that after i edit it to become "index, follow", my site got index but the problem is it index everything, including things i dun want to be indexed like login, shopping cart, and even my blog/wp-contents/plugin!

    On the advice of a great forum participant, i came to this post and edited the init files to include that extra line. Now that everything is back to normal, when i click view source, my meta tags now again have the "noindex, nofollow".

    Question i wanna ask is will it result in my site being deindexed? And will the pages that are not supposed to be indexed, not be indexed?

    I have seen many websites with "noindex, nofollow" and their sites seem to work fine, but i am not sure, and i really want to confirm it in Zencart Forum. I wonder if there are many other people like me with this question?

    Can someone advice pls?

  8. #8

    Default Re: [Done 1.4.0] noindex,nofollow mistakenly appears on home page in certain situatio

    Bugger... I only have just seen this after having had my site live since march. And I only spotted it by chance when I was viewing source. I guess I should visit the forum more often in future.

    However, I did a site: search and found that google had 147 of my pages from this particular site listed. So now I'm confused, I've had the noindex, nofollow there for months but still my site seems to have been picked up by google. Is that normal? Is it just my site is know about but no links carry any weight???

    Confused!?!

 

 

Similar Threads

  1. Noindex Nofollow???
    By batteryman in forum General Questions
    Replies: 6
    Last Post: 29 Apr 2007, 11:04 AM

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