Forums / Installing on a Linux/Unix Server / Old Links still visible?

Old Links still visible?

Started by seventhomen on 30 Nov 2011, 7:47 PM · Views: 1,379

Results 1 to 12 of 12
30 Nov 2011, 7:47 PM
#1
seventhomen avatar

seventhomen

New Zenner

Join Date:
Nov 2011
Posts:
6
Plugin Contributions:
0

Old Links still visible?

Greetings all.

I recently took over the administration tasks of a Zen Cart based web store. Although I am new to Zen Cart, I am not new to websites.
The first thing that I did was create backups of the site and its relative databases. After looking through the site's code, I realized that the previous admin had a lot of modifications in place that did not seem to come from add-ons or modules(no or minimal commenting and poor formatting). The ones that did originate from modules or add-ons were easily recognized(full commenting and formatted to blend in). So, in an effort to keep the development moving forward, I set up an exact copy of the site in a new directory - complete with it's own (cloned and renamed) database and edited configure files. The backup site works, almost. I have spent many hours looking through the code in an attempt to separate the original, the modules,/add-ons, and my predecessor's code. No, it isn't much fun to do that. The problem I am having is that links still want to point back to the live site and that can not happen for testing and future development. I think I tracked the issue down to "zen_href_link". If I am on the right trail, where is this defined? I looked through the code and all the database tables, but I could not find it. I did try to use the developers tools, but the results were not helpful. If I am wrong in my assumption of "zen_href_link" being the issue, does anyone have a suggestion about the way to repair this? I will need to continue to modify the site to fit the owners needs, but I can not do this to a live site. I have to use a test site to accomplish my goals.

Thank you in advance for any help you can provide.
Omen

30 Nov 2011, 8:22 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Old Links still visible?

If I understand, you'll need to edit the path information in admin/includes/configure.php and includes/configure.php.

If the site has URLs from the old site hard-coded in, say, EZ pages, you'll have to edit those manually.

30 Nov 2011, 9:25 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Old Links still visible?

Any internal URLs that are coded as absolute should be changed to relative, as Zen Cart uses a <base href= > which will handle relative links correctly no matter where the cart is installed.

"http://yoursite.com/index.php?main_page=login" ----> "index.php?main_page=login"

5 Dec 2011, 3:58 PM
#4
seventhomen avatar

seventhomen

New Zenner

Join Date:
Nov 2011
Posts:
6
Plugin Contributions:
0

Re: Old Links still visible?

OK, I did a full (redundant - manually and with grep) sweep of the code looking for hard coded links. I fixed any that point back to the original website, following gjh42's advice.
Except, I did not find any of the EZ pages that were mentioned.
Where would I find those? In the database?
I also confirmed that the config files pointed to the correct directory.

This is maddening.

Omen

5 Dec 2011, 4:01 PM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Old Links still visible?

EZ pages are contained in the database, but should be editable in Admin - Tools - EZ-pages.

5 Dec 2011, 4:33 PM
#6
seventhomen avatar

seventhomen

New Zenner

Join Date:
Nov 2011
Posts:
6
Plugin Contributions:
0

Re: Old Links still visible?

After reviewing the dozen or so ez pages, I confirmed that there were not any hard coded internal links.
A curious thing to note is that any search and it's result seems to keep me in the original location.
Is it possible that the easy pages need to be recreated, even though the links appear to be relative?

Any other suggestions?

Omen

5 Dec 2011, 4:40 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Old Links still visible?

I wouldn't think you would need to recreate the EZ pages, but you could just to eliminate a possible problem.

Can you cite a couple of examples of links that are pointing to the old site ? The URL of the site would help, too.

5 Dec 2011, 4:52 PM
#8
seventhomen avatar

seventhomen

New Zenner

Join Date:
Nov 2011
Posts:
6
Plugin Contributions:
0

Re: Old Links still visible?

The URL to the live site is http://www.nelsontactical.com

On the "test" site that is in question here, the links for the categories along the top from 'Home' to 'View All' initially point to the correct directory. Once you choose a sub-category and click it, you ultimately end up back at the live site.

If you choose anything from the 'Categories' or 'Manufacturers' side boxes, the same thing inevitably happens, as well.

Eventually, Search seems to behave in the same manner, as you drill down to a specific product.

Omen

5 Dec 2011, 5:48 PM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Old Links still visible?

Did you also copy over the URL rewriting mod to the test site ? If so, can you turn it off temporarily ?

5 Dec 2011, 5:53 PM
#10
seventhomen avatar

seventhomen

New Zenner

Join Date:
Nov 2011
Posts:
6
Plugin Contributions:
0

Re: Old Links still visible?

I'm afraid I don't know what that is.

Link to info?

5 Dec 2011, 5:58 PM
#11
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Old Links still visible?

The old site is displaying URLs like this:

http: //www.nelsontactical.com/shopping/shop-by-manufacturer-benelli-c-46_222.html

That's not default Zencart behavior. Zencart uses dynamic URLs like this:

http: //www.stevesh.org/demo/index.php?main_page=product_info&cPath=2_18&products_id=21

so someone has installed some kind of 'SEO' URL rewriting mod which converts the dynamic URL to what you see on the old site.

Most here don't recommend using those anymore, and I've never installed one, but there may be a admin configuration option somewhere.

I believe such a mod hard codes the rewritten URLs, so that may be your problem.

5 Dec 2011, 6:05 PM
#12
seventhomen avatar

seventhomen

New Zenner

Join Date:
Nov 2011
Posts:
6
Plugin Contributions:
0

Re: Old Links still visible?

Oh, brother. The plot thickens.

Now, I need to locate the source of that, and eradicate it if possible.

Thanks for the help so far,

Omen