Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2013
    Location
    Eastpointe, Michigan, United States
    Posts
    20
    Plugin Contributions
    0

    Default canonicalLink not working on

    Hello, I am running zen cart version 1.5.1 with several add on plugins and recently I noticed that my canonicalLink was not working. I'm assuming it's because of some add on either eliminated or created an error on one of the files. Please let me know what files control the canonicalLink so I can see where the error is and fix it.
    Thanks

  2. #2
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: canonicalLink not working on

    The template basically controls whether or not to display the canonical link. If there is reason to believe that an error is being generated, then this will typically manifest as a white page or a partial white page. But regardless would/should log a myDebug file to the logs directory beginning in ZC 1.5.1. Otherwise try temporarily changing to the default ZC template and see if your canonical link is restored for display.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: canonicalLink not working on

    Quote Originally Posted by Tadj Hemingway View Post
    Please let me know what files control the canonicalLink so I can see where the error is and fix it.
    /includes/init_includes/init_canonical.php .....is where they are defined


    /includes/templates/YOURTEMPLATE/common/html_header.php ....... is where the are output.

    Cheers
    RodG

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: canonicalLink not working on

    Some info just to help me next time I have this problem and can't remember the answer.

    I found the $canonicallink was not being generated ...and eventually discovered it was due to viewing the page as ssl (https) BUT HTTP_SERVER was http.

    This is trapped by the code in init_canonical:
    PHP Code:
      case ($request_type == 'SSL' && substr(HTTP_SERVER05) != 'https'):
        
    $canonicalLink ''
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: canonicalLink not working on

    Quote Originally Posted by torvista View Post
    Some info just to help me next time I have this problem and can't remember the answer.

    I found the $canonicallink was not being generated ...and eventually discovered it was due to viewing the page as ssl (https) BUT HTTP_SERVER was http.

    This is trapped by the code in init_canonical:
    PHP Code:
      case ($request_type == 'SSL' && substr(HTTP_SERVER05) != 'https'):
        
    $canonicalLink ''
    This appears to have been from an earlier design consideration that https sites/pages would not be indexed, but it is also a reason why the suggestion of the way to implement full site https: is provided in the following FAQ: https://www.zen-cart.com/content.php...alled-zen-cart
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v151 canonicallink url improperly sanitized
    By moogawooga in forum Bug Reports
    Replies: 7
    Last Post: 25 May 2013, 07:36 PM
  2. v150 Admin Log In Not Working, User Log In Not Working All of a Sudden
    By SpydSpyder in forum General Questions
    Replies: 7
    Last Post: 15 Oct 2012, 05:34 AM
  3. v150 base href and canonicalLink have extra directory in urls...
    By WebKat in forum General Questions
    Replies: 4
    Last Post: 3 Mar 2012, 10:12 PM
  4. Moving a working store to new domain name and not working
    By ksolito in forum General Questions
    Replies: 8
    Last Post: 19 Jun 2009, 07:44 PM
  5. add to cart not working...currency not working
    By pcdesigns in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 12 Jun 2008, 05:03 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