Page 1 of 1

changed primary domain, links still go to old domain

Posted: Wed May 27, 2015 4:56 pm
by puppyfat
Hello,

I installed my cmsms site at www.olddomain.com/here/ and once it was up and running, added a new domain and assigned it to this directory.

When I go to the new domain, all works fine except the menu links all point back to the old domain. Image urls are the old ones too.

I have cleared the cache. Am I right in thinking I just have to wait and these links will update automatically? If I look at the html, the links are relative, (sorry, don't know the technical term - links begin with a '/' and don't include the root domain.) My config.php file is really small and does not reference root_url. Do I need to add this line to the file? If so, how exactly do I do it?

Thanks so much in advance :) :) :)

Re: changed primary domain, links still go to old domain

Posted: Wed May 27, 2015 8:55 pm
by velden
Would you mind sharing the real url to the website?

I don't recognize the relative urls in the menu. Usually Menu Manager outputs absolute urls.

Maybe you want to post (one of the) page template here.

Re: changed primary domain, links still go to old domain

Posted: Wed May 27, 2015 9:33 pm
by puppyfat
Sure, thanks!
The new domain is http://www.the-photographer-of-penllergare.co.uk

I am completely new to cmsms, (I didn't create the original site, just transferred the files etc.) so please bear with me! I can see in the templates that the pages call "css_menu.tpl" but when I go to menu manager, I can't see how to open/inspect this file.

The following is the default page template:

Code: Select all

{process_pagedata}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

  <head>
    <title>{sitename} - {title}</title>

 {metadata}

 {cms_stylesheet}

 {cms_selflink dir="start" rellink=1}
 {cms_selflink dir="prev" rellink=1}
 {cms_selflink dir="next" rellink=1}

 {literal}
<__script__ type="text/JavaScript">
<!--
//pass min and max - measured against window width
function P7_MinMaxW(a,b){
var nw="auto",w=document.documentElement.clientWidth;
if(w>=b){nw=b+"px";}if(w<=a){nw=a+"px";}return nw;
}
//-->
</__script>
    <!--[if lte IE 6]>
    <style type="text/css">
    #pagewrapper {width:expression(P7_MinMaxW(720,950));}
    #container {height: 1%;}
    </style>
    <![endif]-->
    {/literal}

    <!--[if lte IE 6]>
    <__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>
    <![endif]--> 
  </head>
  </__body>
    <div id="pagewrapper">

{* start accessibility skip links *}
      <ul class="accessibility">
        <li>{anchor anchor='menu_vert' title='Skip to navigation' accesskey='n' text='Skip to navigation'}</li>
        <li>{anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}</li>
      </ul>
{* end accessibility skip links *}

      <hr class="accessibility" />

{* Start Header *}
      <div id="header">

        <h1>{cms_selflink dir="start" text="$sitename"}</h1>        
        <hr class="accessibility" />
      </div>
{* End Header *}

{* Start Content *}
      <div id="content">

{* Start Content Area *}
              <div id="main">
                {content}

                <hr class="accessibility" />
                <div class="clear"></div>
              </div>
{* End Content Area *}

      </div>
{* End Content *}



{* Start Navigation *}
      <div id="menu_vert">
{* stylesheet  "Navigation: CSSMenu - Horizontal" *}
        <h2 class="accessibility">Navigation</h2>
        {menu loadprops=0 template='cssmenu.tpl'}
        <hr class="accessibility" />
      </div>
{* End Navigation *}

    </div>
{* end pagewrapper *}

  <__body>
</__html>
Many many thanks!

Re: changed primary domain, links still go to old domain

Posted: Thu May 28, 2015 9:59 am
by velden
This causes some problems:

Code: Select all

<base href="http://www.s548422717.websitehome.co.uk/the-photographer-of-penllergare//" />
It comes from {metadata} tag.
Are you very sure the CMSMS is actually cleared? Check if the /tmp/cache... folders are empty after clearing the cache.

Somehow CMSMS gets wrong url from webserver

Suggestion to quickly fix it (though I'd be curious why it happens):
config.php add:

Code: Select all

$config['root_url'] = 'http://www.the-photographer-of-penllergare.co.uk';

Re: changed primary domain, links still go to old domain

Posted: Thu May 28, 2015 10:33 pm
by puppyfat
Brilliant, it's fixed. Thank you! :)