ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Tried upgrading 2.2.2 to 2.3.1 however links and javascript don't work

December 05, 2011 12:21pm

Subscribe [4]
  • #16 / Dec 15, 2011 6:10pm

    McCoy IT

    41 posts

    Tried to update again. No success.
    I created the javascript file outside of the template system and linked to it in my footer template.
    The custom javascript to initiate jquery functions worked like they were suppose to.

    However the links on the page would link back to the homepage http://www.example.com/index.php

    In the source view they are correct http://www.example.com/index.php/category/etc

  • #17 / Dec 19, 2011 2:41pm

    Kevin Smith

    4784 posts

    Tried to update again. No success.

    When you say this, what do you mean exactly? Are there errors or do you just mean that an upgrade doesn’t solve the problems you’re having with EE?

    My apologies, McCoy IT, but I’m having a terrible time trying to understand the issue you’re facing because of the vagueness in your posts. For each of the issues you’re dealing with, could you please tell me what you would expect to happen, what happens instead, and what you’ve done to try to fix it? Please be as detailed and clear as possible, using template code and HTML samples as needed to help specify.

    Thanks!

  • #18 / Dec 19, 2011 3:13pm

    McCoy IT

    41 posts

    I am just posting the steps I have taken to resolve my issue. So you know what I have gone over.

    I have figured out that the Themes folder doesn’t unpack properly because of Windows 7 default unzip tool. That issue is resolved.

    The error/issue I am having is that none of my links on my website work. As in the navigation, footer and page content links don’t go anywhere they just refer back to the homepage. The EE control panel works without any issue. It’s the site I am having problems with.

    When you view the source code the href’s are correct. Is there something changed in 2.3.1/2.3.0 for routing? Is there something new in the index.php besides changing the system directory that I have to add or change?

     

  • #19 / Dec 21, 2011 3:23pm

    Kevin Smith

    4784 posts

    I have figured out that the Themes folder doesn’t unpack properly because of Windows 7 default unzip tool. That issue is resolved.

    So this is resolved? Very good!

    The error/issue I am having is that none of my links on my website work. As in the navigation, footer and page content links don’t go anywhere they just refer back to the homepage.

    And it looks like this is the remaining issue? Again, could you share some template samples to show how the links are rendered, show the HTML output to show the rendered versions of the links, and let us know what happens when you actually visit those links. Do the URLs work when you pull them up directly in the browser?

    As much context as you can provide with your code samples is very helpful. Thanks!

  • #20 / Dec 21, 2011 5:19pm

    McCoy IT

    41 posts

    My Template for the Site Index page.

    {embed="includes/html_header" page_title="Home" page_description="test goes here" page_keywords="keywords go here"}
    <div id="banner" class="container_12">
    <div id="carousel">
     {embed="homepage_incs/.banner"}
    </div>
    </div>
    <div id="content" class="container_12">
    <div class="grid_6 ">
     <div class="padding">
      <h2><a href="http://{path=template_group}">Header</a></h2>
    <p>  <div class="accordion">{exp:channel:categories channel="channel" parent_only="yes" category_group="5"  }<br />
       {if category_id == 22}<br />
      </p><h3><a href="http://{path=%27{category_url_title}%27}" title="Click to expand">{category_name}</a><span><a href="http://{path={category_url_title}}"> more information</a></span></h3>
    <p>   <div class="panel"><br />
       <ul class="listColumn"><br />
       {exp:channel:entries channel="channel" disable="member_data|pagination" dynamic="no" category="22"}<br />
        <li><a href="http://{title_permalink=template_group/view}">{title}</a></li><br />
       {/exp:channel:entries}<br />
                     </ul><br />
       </div><br />
       {if:else}<br />
      </p><h3><a href="http://{path=%27{category_url_title}%27}" title="Click to expand">{category_name}</a><span><a href="http://{path={category_url_title}}"> more information</a></span></h3>
    <p>   <div class="panel"> <br />
       <ul class="listColumn">{embed="homepage_incs/.child_category_query" my_parent="{category_id}"}</ul><br />
       </div><br />
       {/if}<br />
      {/exp:channel:categories}</div><br />
     </div><br />
    </div><br />
    <div class="grid_6 "><br />
     <div class="padding"><br />
      </p><h2><a href="http://{path=template_group}">Header</a></h2>
    <p>  <div class="accordion">{exp:channel:categories channel="channel" parent_only="yes" category_group="6"  }<br />
       {if category_id == 17}<br />
      </p><h3><a href="http://{homepage}/template_group/" title="Click to expand">{category_name}</a><span><a href="http://{homepage}/template_group/"> more information</a></span></h3><p> <br />
       {/if}<br />
       {if category_id == 17}<br />
       <div class="panel"><br />
       <ul class="listColumn">{embed="homepage_incs/.child_category_query" my_parent="{category_id}"}</ul><br />
       </div><br />
       {/if}<br />
      {/exp:channel:categories}</div><br />
     </div><br />
    </div><br />
    </div><br />
    <div id="pagefooter" class="container_12"><br />
     <div class="grid_4 "><br />
     <div class="padding"><br />
      {embed="homepage_incs/.news"}<br />
     </div><br />
     </div><br />
     <div class="grid_4 "><br />
     <div class="padding"><br />
      {embed="homepage_incs/.events"}<br />
     </div><br />
     </div><br />
     <div class="grid_4 "><br />
     <div class="padding"><br />
      {embed="homepage_incs/.contact"}<br />
     </div><br />
     </div><br />
    </div><br />
    {embed="includes/html_footer"}

  • #21 / Dec 21, 2011 5:19pm

    McCoy IT

    41 posts

    My Rendered Source Code

    <!DOCTYPE HTML>
    <html lang="en">
    <head>
     <meta charset="utf-8" />
     <!--[if IE]>
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
     <meta http-equiv="imagetoolbar" content="false" />
     <![endif]-->
     <title>Home - Example</title>
     <meta name="description" content="Text goes here" />
     <meta name="keywords" content="keywords go here" />
     <meta name="author" content="Author" />
     <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0" />
    
     <link rel="image_src" href="/Image.jpg" />
     <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
     <link rel="icon" type="image/gif" href="/animated_favicon.gif" />
     <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
     <link rel="stylesheet" href="http://www.example.com/images/css/styles.css" media="all" />
     <!--[if lt IE 8]>
     <link rel="stylesheet" href="http://www.example.com/images/css/ie.css" media="screen, projection" />
     <![endif]-->
     <!--[if lt IE 9]>[removed][removed]<![endif]-->
     [removed]
     if(document.location.protocol=='http:'){
       var Tynt=Tynt||[];Tynt.push('AAAKKKDJJJEEE');Tynt.i={"ap":"Read more:"};
       (function(){var s=document.createElement('script');s.async="async";s.type="text/javascript";s.src='http://tcr.tynt.com/ti.js';var h=document.getElementsByTagName('script')[0];h[removed].insertBefore(s,h);})();
     }
     [removed]
    
    </head>
    <body>
    <noscript><div class="container_12 notice noPrint">Your browser doesn't support JavaScript. Please contact your network administrator or consult the web browsers help documents for further information.</div></noscript>
    <div id="header" class="container_12">
     <div class="grid_8 ">
      <h1><a href="http://www.example.com/index.php" title="Example" class="logo">Example - <span class="tagline">Tagline</span></a></h1>
     </div>
     <div class="grid_4 ">
     <div id="stockquote"><span class="stockSymbol">Stock Symbol</span><table class="nostripping"><tr><td>Last: $7.10 Change: $<span class="negative">-0.03</span></td></tr><tr><td>Last Trade: 12/21/2011 3:57pm ET</td></tr></table></div>
    
     <form class="inline" method="post" action="http://www.example.com/index.php"  >
    <div class='hiddenFields'>
    <input type="hidden" name="ACT" value="4" />
    <input type="hidden" name="XID" value="809e784269a7452fc6cfcacca841794442329e85" />
    <input type="hidden" name="RES" value="10" />
    <input type="hidden" name="meta" value="YTo />
    <input type="hidden" name="site_id" value="1" />
    </div>
    
    
      <input type="text" name="keywords" id="keywords" alt="search field" value="" size="20" maxlength="250" />
         <input type="submit" value="Search" alt="submit search" rel="search" class="btn1" />
      
    
     </form>
     </div>
    </div>
    
    <div id="navigation" class="container_12">
     <ul>
      <li>
       <a href="http://www.example.com/index.php">Home</a>
      </li>
      <li>
    
       <a href="http://www.example.com/index.php/about">About</a>
       <div class="ddContainer1 size1">
        <ul class="ddItem-1">
         <li><a href="http://www.example.com/index.php/about">About</a></li>
         <li><a href="http://www.example.com/index.php/about/executives">Executives</a></li>
         <li><a href="http://www.example.com/index.php/about/bcc">Business Code of Conduct</a></li>
         <li><a href="http://www.example.com/index.php/about/awards">Awards</a></li>
         <li><a href="http://www.example.com/index.php/about/health-and-safety">Health and Safety</a></li>
        </ul>
       </div>
      </li> 
      <li>
       <a href="http://www.example.com/index.php/contact">Contact</a>
       <div class="ddContainer2 size1">
        <ul class="ddItem-1"><li><a href="http://www.example.com/index.php/contact/category/main-office">Main Office</a></li><li><a href="http://www.example.com/index.php/contact/category/division1">Division1</a></li><li><a href="http://www.example.com/index.php/contact/category/division2">Division2</a></li><li><a href="http://www.example.com/index.php/contact/category/division3">Division3</a></li></ul>   
       </div>
    
      </li> 
      <li>
       <a href="http://www.example.com/index.php/segment">Segment 1</a>
       <div class="ddContainer3 size2">
        <ul class="ddItem-1"><li><div class="subNavHeader"><a href="http://www.example.com/index.php/divison1">Division 1</a></div></li> 
       <li><a href="http://www.example.com/index.php/product1">Product 1</a></li>
       <li><a href="http://www.example.com/index.php/product1/service">Service</a></li>
       <li><a href="http://www.example.com/index.php/product2">Product 2</a></li>
       <li><a href="http://www.example.com/index.php/product3">Product 3</a></li>
       <li><a href="http://www.example.com/index.php/product4">Product 4</a></li>
       <li><a href="http://www.example.com/index.php/product5">Product 5</a></li>
       <li><a href="http://www.example.com/index.php/product6">Product 6</a></li>
      </ul> 
        <ul class="ddItem-2"><li><div class="subNavHeader"><a href="http://www.example.com/index.php/division2">Division 2</a></div></li>
        <li><a href="http://www.example.com/index.php/division2/view/service1">Service 1</a></li>
        <li><a href="http://www.example.com/index.php/division2/view/service2">Service 2</a></li>
        <li><a href="http://www.example.com/index.php/division2/view/service3">Service 3</a></li>
        <li><a href="http://www.example.com/index.php/division2/view/service4">Service 4</a></li>
  • #22 / Dec 21, 2011 5:22pm

    McCoy IT

    41 posts

    The links when clicked go back to the main site/index page http://www.example.com/index.php
    Tried manually typing in a different page and it goes back to http://www.example.com/index.php.

  • #23 / Dec 23, 2011 5:42am

    John Henry Donovan

    12339 posts

    Hi McCoy IT,

    Can I check one thing with you. When you upgraded did you replace the root index.php with the correct EE2.3.1 version?

  • #24 / Dec 23, 2011 1:41pm

    McCoy IT

    41 posts

    Yup I used the new index.php and admin.php and altered the systems line to match my custom folder name.

  • #25 / Dec 23, 2011 5:35pm

    Sean C. Smith

    3818 posts

    McCoy,

    Could you try removing blocks of your template one by one and see if the change affects your code. I would start by removing bits from your head first.

    One other thing to do would be to replace the entire template with some basic code and see if links/javascript work in that.

    Sean

  • #26 / Dec 28, 2011 12:40pm

    McCoy IT

    41 posts

    Why would I have to alter my templates if they worked from 2.0 Public Beta up until now?

  • #27 / Dec 28, 2011 6:09pm

    McCoy IT

    41 posts

    Attempted another update.
    Went through and double checked all of my update procedures.
    I tried altering my template.
    I validated my HTML and it comes up without any issues.


    It’s so weird to have the page render as it should and none of the links go to their appropriate page on the site.

  • #28 / Dec 28, 2011 7:19pm

    Sean C. Smith

    3818 posts

    McCoy,

    The links when clicked go back to the main site/index page http://www.example.com/index.php
    Tried manually typing in a different page and it goes back to http://www.example.com/index.php.

    I just reviewed this thread again and the above is making me wonder if you have anything in your .htaccess file that could be causing this redirect. Could you please post your .htaccess file here.

    And just to confirm, manually typing in a link results in you being redirected to the homepage, correct?

    Altering the templates is just a troubleshooting method I’ve used successfully in the past to troubleshoot. Of course I always save the full template in another location while doing this.

    Sean

  • #29 / Dec 29, 2011 10:39am

    McCoy IT

    41 posts

    <FilesMatch “\.(ttf|ttc|otf|eot|woff|font.css)$”>
      <IfModule mod_headers.c>
      Header set Access-Control-Allow-Origin “*”
      </IfModule>
    </FilesMatch>
    AddType application/javascript js
    AddType audio/ogg oga ogg
    AddType audio/mp4 m4a
    AddType video/ogg ogv
    AddType video/mp4 mp4 m4v
    AddType video/webm webm
    AddType image/svg+xml svg svgz
    AddEncoding gzip svgz
    AddType application/vnd.ms-fontobject eot
    AddType font/truetype ttf ttc
    AddType font/opentype otf
    AddType font/woff woff
    AddType image/x-icon ico
    AddType image/webp webp
    AddType text/cache-manifest appcache manifest
    AddType text/x-component htc
    AddType application/x-chrome-extension crx
    AddType application/x-xpinstall xpi
    AddType application/octet-stream safariextz
    AddType text/x-vcard vcf

    <IfModule mod_deflate.c>
    <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
      SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
      RequestHeader append Accept-Encoding “gzip,deflate” env=HAVE_Accept-Encoding
    </IfModule>
    </IfModule>
    <IfModule filter_module>
    FilterDeclare COMPRESS
    FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
    FilterProvider COMPRESS DELFATE resp=Content-Type $text/css
    FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
    FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
    FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
    FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
    FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
    FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
    FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
    FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
    FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
    FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
    FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
    FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
    FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
    FilterChain COMPRESS
    FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
    </IfModule>

    <IfModule !mod_filter.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
    AddOutputFilterByType DEFLATE image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
    </IfModule>
    </IfModule>

    <IfModule mod_expires.c>
      ExpiresActive on
      ExpiresDefault “access plus 1 month”
      ExpiresByType text/cache-manifest “access plus 0 seconds”
      ExpiresByType text/html “access plus 0 seconds”
      ExpiresByType text/xml “access plus 0 seconds”
      ExpiresByType application/xml “access plus 0 seconds”
      ExpiresByType application/json “access plus 0 seconds”
      ExpiresByType application/rss+xml “access plus 1 hour”
      ExpiresByType image/x-icon “access plus 1 week”
      ExpiresByType image/gif “access plus 1 month”
      ExpiresByType image/png “access plus 1 month”
      ExpiresByType image/jpg “access plus 1 month”
      ExpiresByType image/jpeg “access plus 1 month”
      ExpiresByType video/ogg “access plus 1 month”
      ExpiresByType audio/ogg “access plus 1 month”
      ExpiresByType video/mp4 “access plus 1 month”
      ExpiresByType video/webm “access plus 1 month”
      ExpiresByType text/x-component “access plus 1 month”
      ExpiresByType font/truetype “access plus 1 month”
      ExpiresByType font/opentype “access plus 1 month”
      ExpiresByType font/woff “access plus 1 month”
      ExpiresByType image/svg+xml “access plus 1 month”
      ExpiresByType application/vnd.ms-fontobject “access plus 1 month”
      ExpiresByType text/css “access plus 1 month”
      ExpiresByType application/javascript “access plus 1 month”
      ExpiresByType text/javascript “access plus 1 month”
      <IfModule mod_headers.c>
    Header append Cache-Control “public”
      </IfModule>
    </IfModule>

    <IfModule mod_headers.c>
    Header unset ETag
    </IfModule>
    FileETag none

    <IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine on
    </IfModule>

    Options -MultiViews
    Options -Indexes

    <IfModule mod_rewrite.c>
    RewriteCond %{HTTP_HOST} example\.com [NC]
    RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    RewriteRule ^(.*) http://www.example\.com/$1 [L,R=301]

    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
    </IfModule>

    ErrorDocument 404 http://www.example.com/index.php/site/error_404

    AddDefaultCharset utf-8
    AddCharset utf-8 .html .css .js .xml .json .rss
    ServerSignature Off


    I am also using the Blacklist/Whitelist Module which would be right after all of these settings.

  • #30 / Dec 30, 2011 4:51am

    John Henry Donovan

    12339 posts

    Hi McCoy IT,

    Can you rename your htaccess temporarily to see if it has been having an affect on your links?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases