Forums / Upgrading to 1.5.x / EZ Pages links in product description giving 404 'page not found' error

EZ Pages links in product description giving 404 'page not found' error

Views: 1,937

Results 1 to 17 of 17
29 Apr 2016, 8:36 PM
#1
jingjo avatar

jingjo

New Zenner

Join Date:
May 2011
Posts:
29
Plugin Contributions:
0

EZ Pages links in product description giving 404 'page not found' error

Hi

I've rebuilt (upgraded) to v155 in a folder called 'catalog' off my root directory. My web host company have redirected both www.my_site.com.au and my_site.com.au to www.my_site.com.au/catalog and everything seems to be working fine except...

I've got links on my product description pages to a size chart made with EZ Pages i.e. <p>For Sizing please refer to <a href="index.php?main_page=1&ezID=10" target="_blank">Size Chart</a></p>

When I click on the link I go to http://www.my_site.com.au/catalog/index.php?main_page=1&ezID=10 and instead of the 'size chart' I get 'page not found'

Any ideas where I'm going wrong?

29 Apr 2016, 10:24 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: EZ Pages links in product description giving 404 'page not found' error

What was the purpose of adding the "catalog" folder?

It seems you've probably got your domain pointing to folder A, but your site is thinking it's in folder B ...

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Apr 2016, 11:41 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EZ Pages links in product description giving 404 'page not found' error

I realize that this is not likely the case, but in your admin for this site in the catalog directory when you goto ezpages, is this particular content assigned (still assigned?) to the id of 10? Also, while clicking the link takes you to the catalog directory, does the link (before clicking on it) point to the catalog directory (I think this is possibly a duplicate to DrByte's post but looking at it from a different perspective.)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

30 Apr 2016, 6:18 AM
#4
jingjo avatar

jingjo

New Zenner

Join Date:
May 2011
Posts:
29
Plugin Contributions:
0

Re: EZ Pages links in product description giving 404 'page not found' error

DrByte:

What was the purpose of adding the "catalog" folder?

It seems you've probably got your domain pointing to folder A, but your site is thinking it's in folder B ...

I'm using the catalog 'folder' to make future upgrades/rebuilds easier. I'm thinking that if I rebuild in a subdirectory I can test the site out while keeping the old site live and then redirect to the new directory when it is all sorted.

There is probably something about the site thinking it is in folder B. Any way of pointing it to to A?

30 Apr 2016, 8:55 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: EZ Pages links in product description giving 404 'page not found' error

jingjo:

There is probably something about the site thinking it is in folder B. Any way of pointing it to to A?

Your configure.php files control all of how Zen Cart operates with your folders and URLs.

So, if you changed your server to make https://www.example.com point to public_html/catalog instead of public_html/ then you need to change the DIR_FS_CATALOG (and probably several other) settings in your configure.php to match the new folder you told the server to use.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 May 2016, 12:38 AM
#6
jingjo avatar

jingjo

New Zenner

Join Date:
May 2011
Posts:
29
Plugin Contributions:
0

Re: EZ Pages links in product description giving 404 'page not found' error

DrByte:

Your configure.php files control all of how Zen Cart operates with your folders and URLs.

So, if you changed your server to make https://www.example.com point to public_html/catalog instead of public_html/ then you need to change the DIR_FS_CATALOG (and probably several other) settings in your configure.php to match the new folder you told the server to use.

I installed a new install into the subdirectory so the configure.php files look correct. I've got the line: define('DIR_FS_CATALOG', '/var/www/sites/www.my_site.com.au/html/catalog/');
as well as these lines:
define('DIR_WS_CATALOG', '/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/catalog/');
but still get a 404 message.

I've made a new 'test' page with EZ Pages and still get the same error. The problem seems to be in EZ Pages

1 May 2016, 1:21 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: EZ Pages links in product description giving 404 'page not found' error

I don't think the issue is with ez-pages.

Maybe you're putting the wrong link in?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 May 2016, 1:44 AM
#8
jingjo avatar

jingjo

New Zenner

Join Date:
May 2011
Posts:
29
Plugin Contributions:
0

Re: EZ Pages links in product description giving 404 'page not found' error

DrByte:

I don't think the issue is with ez-pages.

Maybe you're putting the wrong link in?
Thanks DrByte

The link I'm using in the product description is <a href="index.php?main_page=1&ezID=10" target="_blank">Size Chart</a>. The EZ Page ID is 10. And still no luck. :frusty:

1 May 2016, 3:33 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: EZ Pages links in product description giving 404 'page not found' error

jingjo:

The link I'm using in the product description is <a href="index.php?main_page=1&ezID=10" target="_blank">Size Chart</a>. The EZ Page ID is 10. And still no luck.
That's definitely wrong.

Since you haven't posted the actual URL to your site, I can't test this, but this fits the correct syntax much more correctly, assuming you're using the built-in original EZ-Page functionality and haven't changed it by rewriting how it works and how it uses its parameters:

index.php?main_page=page&id=10

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 May 2016, 4:39 AM
#10
jingjo avatar

jingjo

New Zenner

Join Date:
May 2011
Posts:
29
Plugin Contributions:
0

Re: EZ Pages links in product description giving 404 'page not found' error

DrByte:

That's definitely wrong.

Since you haven't posted the actual URL to your site, I can't test this, but this fits the correct syntax much more correctly, assuming you're using the built-in original EZ-Page functionality and haven't changed it by rewriting how it works and how it uses its parameters:

index.php?main_page=page&id=10


Thanks DrByte

Perhaps, I should explain. I haven't included posted a URL because I'm testing on a new test server made by my web host to comply with PayPal's requirement to TLS 1.2 and HTTP/1.1. My live site is built on v150 and uses the outdated PHP 5.2 My web host has/is encouraging me to upgrade so I've installed v155 and a new responsive template... that is how I got here. I've installed my database and upgraded it as per instructions and it seems fine. I can see and edit my EZ Pages in Admin - Tools - EZ Pages so they are sitting in my database.

I tried adding the link <a href="index.php?main_page=page&id=10" target="_blank">Size Chart</a> to a product description page and the error message I'm getting now is 'Sorry, the page you were attempting to access cannot be found.'
1 May 2016, 4:46 AM
#11
jingjo avatar

jingjo

New Zenner

Join Date:
May 2011
Posts:
29
Plugin Contributions:
0

Re: EZ Pages links in product description giving 404 'page not found' error

DrByte

Here is a pic of my admin - tools - EZ Pages
Attachment 16277

1 May 2016, 10:30 AM
#12
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: EZ Pages links in product description giving 404 'page not found' error

Can you access this page from your sidebox Important Links

Zen-Venom Get Bitten

1 May 2016, 3:43 PM
#13
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: EZ Pages links in product description giving 404 'page not found' error

What happens if you toggle all the TOC buttons from RED to GREEN?

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

1 May 2016, 8:04 PM
#14
jingjo avatar

jingjo

New Zenner

Join Date:
May 2011
Posts:
29
Plugin Contributions:
0

Re: EZ Pages links in product description giving 404 'page not found' error

RixStix:

What happens if you toggle all the TOC buttons from RED to GREEN?

Thanks Rick

I didn't think toggling all the TOC buttons would do anything, however... EZ Pages now work! :cheers: :thumbsup:

1 May 2016, 8:14 PM
#15
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: EZ Pages links in product description giving 404 'page not found' error

That "got me" too between updating from v1.3.9 to 1.5.x

Glad it was something easy to fix without extra coding. :smile:

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

2 May 2016, 3:29 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: EZ Pages links in product description giving 404 'page not found' error

jingjo:

DrByte

Here is a pic of my admin - tools - EZ Pages
Attachment 16277
One of Header/Footer/Sidebox must be checked/green for the page to be "enabled".

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 May 2016, 4:14 AM
#17
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,846
Plugin Contributions:
0

Re: EZ Pages links in product description giving 404 'page not found' error

..or

If the page is too be hidden from any of the provided normal locations header, footer, sidebox link locations. It is only accessible from a link inside of a description you can go too includes/modules/pages/page/header_php.php line 29 and comment it out

THIS

$sql = "select * from " . TABLE_EZPAGES . " where pages_id = " . (int)$ezpage_id;
// comment the following line to allow access to pages which don't have a status switch set to Yes:
$sql .= " AND (status_toc > 0 or status_header > 0 or status_sidebox > 0 or status_footer > 0)";

BECOMES THIS

$sql = "select * from " . TABLE_EZPAGES . " where pages_id = " . (int)$ezpage_id;
// comment the following line to allow access to pages which don't have a status switch set to Yes:
[B]// [/B]$sql .= " AND (status_toc > 0 or status_header > 0 or status_sidebox > 0 or status_footer > 0)";

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!