Moved my site to the server root ; links still pointing to old base URL

Permalink
My website was in the folder /test.

I have not been developping or customizing the website, but I had to put it online, which meant moving it from /test to /.

Backed up everything, it all worked fine, but the links in the nav are still pointing to /test/...

I've seen a lot of similar requests on the forum and the main answers are :
* Change the DIR REL in the config/site.php file ; but it doesn't appear on my site.php file
* Update the htaccess file ; and this one is not on the server even when after turning on hidden files
* Alongside with clearing cache, disabling pretty URLs, etc.

In the navigation.php file, all links are # ; I don't know where the configuration of those links can be found...

Thanks for your answers

 
hutman replied on at Permalink Reply
hutman
I would suggest first to try adding both a BASE_URL and a DIR_REL into your config/site.php. The BASE_URL should be your site's main URL and the DIR_REL can be defined as just blank.

If you have pretty URLs turned on (and working) there has to be a .htaccess file in the root of your site or they wouldn't work, I would suggest disabling Pretty URLs and turning them back on, it will either tell you the file was created for you, or give you the code to create it yourself.

Clearing cache (or manually deleting all files in the /files/cache directory) should be done, but I'm sure you have done that already.

Is your nav an auto nav, or is it something custom that you built?

Sorry for so much of the same information you have seen before, but usually these things work to get things moved correctly.
Moop replied on at Permalink Reply
Hi Hutman, and thanks for your fast answer.

I would suggest first to try adding both a BASE_URL and a DIR_REL into your config/site.php. The BASE_URL should be your site's main URL and the DIR_REL can be defined as just blank.

> I have tried that already ! Cleared C5 and browser cache, in vain.

If you have pretty URLs turned on (and working) there has to be a .htaccess file in the root of your site or they wouldn't work, I would suggest disabling Pretty URLs and turning them back on, it will either tell you the file was created for you, or give you the code to create it yourself.

> Actually they are not turned on and I don't need them.

Clearing cache (or manually deleting all files in the /files/cache directory) should be done, but I'm sure you have done that already.

> I have :(

Is your nav an auto nav, or is it something custom that you built?

> Again, the developper is not available and I have to put it online ASAP. That's why I don't know where to configure the nav, or if its auto nav or custom. If that can help, here's the website : wwww.h2a-capital.com. I also did not specify that but the homepage is working fine, I can access the pages to the correct URLs. It's just the nav links that are still wrong.

Sorry for so much of the same information you have seen before, but usually these things work to get things moved correctly.

> I know :) But maybe it's much easier... Anyway I'm struggling :) Thanks again.
hutman replied on at Permalink Reply
hutman
I looked at the site and it looks to me like the navigation is created with auto-nav, so that should pull the settings from the site.php without having to mess with it.

Can you try a few things?

1) Turn off Caching, set everything to off (just for now)
2) Clear the Cache after it is turned off
3) Double check that your site.php has these two lines
define('BASE_URL', 'http://www.h2a-capital.com');
define('DIR_REL', '');

4) Turn on Pretty URLs, I know you said you don't need them, but they don't hurt and might help.

One other thing that I noticed is that on your homepage your URLs display with capital letters, but when I take the /test out of them they display lower case. This makes me think there is something else going on.

Let me know what happens after you've completed those things (if anything).
Moop replied on at Permalink Reply
Ok I've done all the steps you've mentionned, and it's still pointing to /test/ but the page now looks different (used to be a 1&1 404 page, now it's a C5 404).

Also, I'm not experiencing the capital problem you're talking about...

I'm going to clear my browser cache see if it helps !
hutman replied on at Permalink Reply
hutman
Alright, there is definitely something goofy going on here.

Here is the link in the Navigationhttp://www.h2a-capital.com/test/index.php/Conseil/... here is what it redirects to when I remove the /testhttp://www.h2a-capital.com/conseil/...

See how the Conseil is not consistent with the case? I'm also noticing that this linkhttp://www.h2a-capital.com/themes/LPB/image/logo.png... is broken, which should be pointing to the root of your site.

Can you please check and see if that file does exist on your server? Also, did you remove all files from the /test directory or are they still there?
Moop replied on at Permalink Reply
[No change after clearing cache btw]

Ah, this is new... Basically what I had before was this :
* Working homepage
* Nav link tohttp://www.h2a-capital.com/test/index.php/Conseil/...
* Remove the /test part
* Then I'm onhttp://www.h2a-capital.com/index.php/Conseil/... which is the correct page

Now, indeed, it does redirect me tohttp://www.h2a-capital.com/conseil/... with the lowercase. That page is now broken because the block is doubled and incomplete. Also the logo image is missing.

About the image, if it was the logo, it is missing from the website now...

What I initially did was :
* Backing up the whole /test directory to my PC
* Moving /test to /Backup/test
* Copying that same folder to the root

It seems like these few steps have kind of backfired ; or maybe they're showing more clearly what's happening. Anyway, I have no idea what's going on... :(
hutman replied on at Permalink Reply
hutman
If you still have the files on your PC or in the /Backup directory can you see if this file /themes/LPB/image/logo.png still exists in either one?

For some reason I feel like 1/2 of the site is pulling from the old /test directory and 1/2 from the new root stuff.

If you login to the CMS can you go to the Full Sitemap, go to Properties for the Conseil page and under Page Paths and Location include what is listed for Canonical URL.

Your URLs shouldn't be uppercase, so I'm somewhat concerned at why they are/were every displaying uppercase.
Moop replied on at Permalink Reply
Here's what I had for that :https://cloudup.com/cvujeihqCWA...
Moop replied on at Permalink Reply
Just so you know, the Conseil page is being fishy.
The block has been doubled as I was saying, except that in Edit mode I can't edit that 2nd block. Also the blocks are missing a part of the code...
hutman replied on at Permalink Reply
hutman
When you moved the site did you also move the database?
Moop replied on at Permalink Reply
I did not copy the database, I did back it up on PHPMyAdmin but as it was only a change of directory I thought I wouldn't need to re-import it ?

Also I was going to do so, but my hosting plan only allows me to have 1 database, so I would have to delete the current to create a new one.
hutman replied on at Permalink Reply
hutman
That's fine that you didn't move it, but what is interesting is that all of the block records (like which blocks are on which pages) are stored in the database. So if you are saying that this block is only screwed up after moving the files then something go changed in your files to call that area twice or something to that affect.

Also, if changing the PrettyURL setting in the CMS makes your URLs different and loses your Logo there is either an index.html that is actually showing when you get to the site (not the CMS homepage), or there is something wrong with your theme, because that should not affect the files at all.
Moop replied on at Permalink Reply
Ok... Well thanks anyway for you help and time... I don't know how I'll make this work :(
Moop replied on at Permalink Reply
PS : After re-deisabling pretty URLs, the logo's back, the case / redirection problem is not here anymore... But the issue's the same as before :)
hutman replied on at Permalink Reply
hutman
What I can tell from this is that the CMS is using the correct BASE_URL and DIR_REL because otherwise that would display with /test

Which purchased theme are you using for the front end? Is your cache still turned off?
Moop replied on at Permalink Reply
Here are the themes :https://cloudup.com/cv2LxkmQR-a...
FYI, the last one, which has been made by the developper says : This theme contains no styles that can be customized.
hutman replied on at Permalink Reply
hutman
Where did you acquire this theme? It certainly did not come from the Marketplace if there is no thumbnail.
Moop replied on at Permalink Reply
Yea as I said this one's been made by the developer.
hutman replied on at Permalink Best Answer Reply
hutman
If you go into the /themes/LPB/default.php are you able to see where the navigation is generated?

It will either be in that file, or at the top of that file if it is including a header or something of that nature.

I'm starting to wonder if the navigation is actually hard coded and not pulling in through AutoNav, that would explain a lot in this situation.
Moop replied on at Permalink Reply
Oooook that was it ! I did not even check cause I thought it wouldn't be hardcoded :x
Thanks a lot for this, I'm gonna edit the code, see if it all works.
I've managed to correct the doubled content problem (I might have changed the page type by mistake at some point). So hopefully it should all be fixed in the next hour - will let you know.
Thanks so much for you time Hutman !
Moop replied on at Permalink Reply
It's all good now... I feel bad I made you waste time on such a dumb oversight... Thanks a lot anyway !