Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add New Box Page Link Not Working, Ive Missed Something


Ausgirl

Recommended Posts

Hello,

 

Ive added a new box, then added new box pages but when you click on the link, I just get a blank page. Ive missed something or left something out. Could someone please tell me what I havent done. You can see here when you click on desexing under education. Its not linking to the page.

 

Thanks

Link to comment
Share on other sites

Basic steps:

 

1. Create the file in the catalog directory (eg. mynewfile.php)

2. Define the filename to catalog/includes/filenames.php

define('FILENAME_MYNEWFILE', 'mynewfile.php');

3. Create a link to language and breadcrumb in the new file

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_MYNEWFILE);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_MYNEWFILE));

4. Create a language file for the new file (eg. catalog/includes/languages/english/mynewfile.php).

Link to comment
Share on other sites

mmmm, Ive done all that, its still not working. The page is still blank. This is my boxes/new box links.php page: (copied from the information.php) The links arent going anywhere (although, Ive only made up one page so far) Ive made up a language file, added the requirements for, english, filename, catalog. Ive followed the instructions from the knowledge base. Ive done something wrong. The page is there and can be edited in the new english file created but its not showing up. Theres something Im doing wrong but I dont know what it is.

 

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_MY_NEW_BOX);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('text' =>

'<a href="' . tep_href_link(FILENAME_DESEXING) . '">' . BOX_MY_NEW_BOX_PAGE1 . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PAGE2) . '">' . BOX_MY_NEW_BOX_PAGE2 . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PAGE3) . '">' . BOX_MY_NEW_BOX_PAGE3 . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PAGE4) . '">' . BOX_MY_NEW_BOX_PAGE4 . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PAGE5) . '">' . BOX_MY_NEW_BOX_PAGE5 . '</a>');

 

new infoBox($info_box_contents);

Link to comment
Share on other sites

I got this:

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@mysite and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

 

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

 

--------------------------------------------------------------------------------

Link to comment
Share on other sites

Probably an error with the htaccess file and the notation I gave you. Probably you must be specific on your server like:

 

#php4
<IfModule mod_php4.c>
php_flag display_errors on
php_value error_reporting 7
</IfModule>
#php5
<IfModule mod_php5.c>
php_flag display_errors on
php_value error_reporting 7
</IfModule>

 

Or your server doesn't like to be overridden by htaccess.

 

Anyway, mostly I've seen blank pages coming up when a space or empty line precedes the <? php opening tag, or after the ?> php closing tag. Did you check your new files for that?

Link to comment
Share on other sites

No spaces or empty lines, I even added some just to see what would happen, I still get nothing. Heres the catalog/newpage.php:

 

<?php

 

/*

 

$Id: desexing.php,v 1.21 2003/02/13 04:23:23 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License

 

*/

 

require('includes/application_top.php');

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DESEXING );

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_DESEXING ));

 

I added this to catalog/includes/filenames:

 

define('FILENAME_DESEXING', 'desexing.php');

 

Added this to catalog/includes/language/english.php

 

// my new box text in includes/boxes/education.php

define('BOX_HEADING_MY_NEW_BOX', 'Education');

define('BOX_MY_NEW_BOX_PAGE1', 'Desexing');

define('BOX_MY_NEW_BOX_PAGE2', 'New Page2');

define('BOX_MY_NEW_BOX_PAGE3', 'New Page3');

define('BOX_MY_NEW_BOX_PAGE4', 'New Page4');

define('BOX_MY_NEW_BOX_PAGE5', 'New Page5');

 

Added this desexing file to catalog/includes/language/english/desexing.php

 

<?php

 

/*

 

$Id: desexing.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2002 osCommerce

Released under the GNU General Public License

 

*/

 

define('NAVBAR_TITLE', 'Desexing');

define('HEADING_TITLE', 'Desexing');

define('TEXT_INFORMATION', 'YOUR ABOUT US TEXT GOES HERE');

?>

 

Dont forget I just added the spaces, there were none before, have I done this right or have I missed something?

Link to comment
Share on other sites

Works like this on my test environment. What if you copy the original catalog/includes/languages/english/privacy.php file, rename it to desexing.php (don't change the content) and replace it with the file online?

Link to comment
Share on other sites

I replaced it with privacy original content and renamed it, but still got the blank page. I dont know whats wrong with it. Tis a bit frustrating. I have done everything right with adding the new page havent I? If I replace the newboxes.php contents with the information content it works with the original content but as soon as I change it to my own content eg: desexing, it doesnt work.

Link to comment
Share on other sites

I replaced it with privacy original content and renamed it, but still got the blank page. I dont know whats wrong with it. Tis a bit frustrating. I have done everything right with adding the new page havent I? If I replace the newboxes.php contents with the information content it works with the original content but as soon as I change it to my own content eg: desexing, it doesnt work.

Have you tried the contrib Extra Pages - Info Box

Link to comment
Share on other sites

Another way to show errors is by putting following line in the top of your catalog/desexing.php file:

 

ini_set("display_errors","1");

 

insert the line after:

require("includes/application_top.php");

Link to comment
Share on other sites

Hello Leslie,

 

No, Ive not tried that, its not my site, I suggested installing IPU which is similar but its not what they want even though it would make life easier, anyway, I dont think this is happening, someone else in the forum seems to be having the same problem. Im ready to tell them "this is how it is" like it or not. Maybe Ill try installing that mod you suggested, they'll never know the difference. :)

Link to comment
Share on other sites

OSC Hellas,

 

lol, I added that, and nothing happened, maybe Im going blind. Where should the error show? On the blank page thats still blank?

Link to comment
Share on other sites

Hello Leslie,

 

No, Ive not tried that, its not my site, I suggested installing IPU which is similar but its not what they want even though it would make life easier, anyway, I dont think this is happening, someone else in the forum seems to be having the same problem. Im ready to tell them "this is how it is" like it or not. Maybe Ill try installing that mod you suggested, they'll never know the difference. :)

I have installed and it is so easy to use.

 

My original information box is now called help, and the new one is called information.

Link to comment
Share on other sites

Thanks all, I just installed Extra Pages - Info Box it was much easier, thank you :)

 

 

OK what did I miss here.

How did you get it to work?

Mine is still dead.

Can you send all the codes etc that you used.

 

Gill A

Link to comment
Share on other sites

G'day Gill,

 

I didnt install the extra box and pages as stated in the knowledge base as it just would not work. Instead, I took Leslie's suggestion and installed THIS contribution. It was easy to install and easy to use. You may also want to LOOK at this one also.

 

Hope that helps :)

Link to comment
Share on other sites

Here it IS the site with the extra info box (education/news) and here IS the site with the IPU in the information box.

 

The extra box you can only apply 9 pages to (I think) and the IPU you can add as many as you like.

 

Hope that helps

 

:)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...