Forums / Templates, Stylesheets, Page Layout / file is there but keep getting 404

file is there but keep getting 404

Locked

Views: 1,200

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
5 Nov 2006, 11:51 PM
#1
evolive avatar

evolive

New Zenner

Join Date:
Nov 2006
Posts:
10
Plugin Contributions:
0

file is there but keep getting 404

Hello,

https://www.8fstudios.com/

under Photography Services - Portrait

If you look at the status bar it can't find the file so I get the Page Not Found page.

I have the following files in these directories:

\includes\languages\english\portrait.php
\includes\languages\english\html_includes\define_portrait.php
\includes\templates\template_default\templates\tpl_portrait_default.php
\includes\languages\english\html_includes\classic\define_portrait.php

Here is the code that would call out the portrait.php file:

if (DEFINE_PORTRAIT_STATUS <= 1) {
$photography_services[] = '<a href="' . zen_href_link(FILENAME_PORTRAIT) . '">' . BOX_INFORMATION_PORTRAIT . '</a>';
}

Help? It's a matter of telling whatever file to find that portrait.php file and I can't figure out who is lost. :cry:

Thank you! :cool:

6 Nov 2006, 6:36 AM
#2
kobra avatar

kobra

Black Belt

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

Re: file is there but keep getting 404

Looking at your other pages like wedding = http://8fstudios.com/index.php?main_page=page_4

and then to the portrait = http://8fstudios.com/index.php?main_page=FILENAME_PORTRAIT

I would double check the define for this name as this is usually the issue when this happens. Check that the description is contained in single quotes and syntax is like others.

Zen-Venom Get Bitten

6 Nov 2006, 6:54 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: file is there but keep getting 404

You are essentially creating another page for your site. You need to define the filename for it.

You can create your own definition for your portrait file:
/includes/extra_datafiles/portrait_filenames.php

<?php
define('FILENAME_PORTRAIT', 'portrait');
?>

.
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.

6 Nov 2006, 7:25 AM
#4
evolive avatar

evolive

New Zenner

Join Date:
Nov 2006
Posts:
10
Plugin Contributions:
0

Re: file is there but keep getting 404

Hello,

I've checked them all and they all are correct. I checked each of the spelling and they all are portrait.

When I type in manually "http://8fstudios.com/index.php?main_page=portrait" the page does exist.

Could you tell me where this "FILENAME_PORTRAIT" is supposed to be located in? Maybe that's where I am supposed to look into. I did a search for anything page_3.* and I changed each file/directory to see if I can get the same problem as the Portrait but unfortunately no luck. So I'm guessing there is a directory or another file that I need to modify. Question is where?

Thank you!

6 Nov 2006, 7:30 AM
#5
evolive avatar

evolive

New Zenner

Join Date:
Nov 2006
Posts:
10
Plugin Contributions:
0

Re: file is there but keep getting 404

Apparently this works. MR. DRBYTE

Could you enlighten me why your code works? Versus this default ==>

  if (DEFINE_PAGE_3_STATUS <= 1) {
    $photography_services[] = '<a href="' . zen_href_link(FILENAME_PAGE_3) . '">' . BOX_INFORMATION_PAGE_3 . '</a>';
  }

where all I did was rename PAGE_3 to PORTRAIT and all files associated to PAGE_3

:smartass:

Thanks!

DrByte:

You are essentially creating another page for your site. You need to define the filename for it.

You can create your own definition for your portrait file:
/includes/extra_datafiles/portrait_filenames.php

<?php define('FILENAME_PORTRAIT', 'portrait'); ?>
6 Nov 2006, 7:34 AM
#6
evolive avatar

evolive

New Zenner

Join Date:
Nov 2006
Posts:
10
Plugin Contributions:
0

Re: file is there but keep getting 404

Oh!!!

I think I know now. After looking at your code again.... I realized... oh it's because FILENAME_PORTRAIT is not defined. Then I read your post again and yeah... IT PAYS TO READ!!!!

:)

THANKS!

6 Nov 2006, 7:51 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: file is there but keep getting 404

exactly.

Glad it's working for you.

.
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.