Zen Cart Logo
Forums / General Questions / Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Views: 3,118

Results 1 to 15 of 15
28 Mar 2011, 9:47 PM
#1
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Hi there,

I'm a relatively new user to Zencart (version 1.39h). I've successfully changed the heading/nav bar titles of pages 2, 3 & 4 in the english.php file. However, I'm having problems after changing the URL too, to match these new heading/nav bar titles.

I've followed the following instructions posted in another thread, and managed to change the URL itself. However, all the text from the web page previously displayed (i.e. page 2 had my 'About Us' text) is completely blank when I load up the page in a browser - even though it's displayed fine when I select the given page in the 'Define Pages' editor.

Here are the instructions I followed to change the URL itself:

"if you care about the url...

you need to change includes/filenames.php
find define('PAGE_2', 'page_2'); and change the lower case page_2 to what ever you want to name it - I CREATED AN OVER-RIDE FOLDER, COPIED FILENAMES.PHP TO THAT AND MODIFIED THAT FILE.

now find includes/languages/english/page_2.php and rename it. ( changing the text inside as well - AGAIN, COPIED THE PAGE_2.PHP FILE TO MY OVER-RIDE FOLDER, RENAMED IT AND CHANGED THE TEXT INSIDE FOR THE NAVIGATION AND BREADCRUMB LINKS.

now go to includes/languages/english/html_includes/page_2.php and rename it. - I DID NOT FIND THIS FILE HERE - COULD ONLY SEE "DEFINE_PAGE2.PHP. I JUST CHANGED THIS FILE NAME IN MY OVER-RIDE DIRECTORY.

now go to includes/modules/pages/page_2 and change the name of the folder to what ever your new name is. - I CHANGED THE NAME OF THIS FOLDER DIRECTLY - I DID NOT CREATE AN OVER-RIDE FOLDER. SHOULD I HAVE ADDED AND OVER-RIDE FOLDER WITH THE RENAMED FOLDER INSIDE THAT? THERE IS A HEADER_PHP FILE IN THERE THAT I DID NOT CHANGE.

now go to includes/templates/your_templat/templates/tpl_page_2_default.php and change the name to tpl_your new name_default.php - DONE"

I also installed an SQL patch so my altered page names can be turned on/off from the 'Define Page' Status in the Admin, but this has made no difference, and a blank page is still displaying without the text I've written.

I'd be so very grateful for some help with this issue as I've spent nearly 3 days trying to figure it out (the longest I've spent trying to figure out any single Zencart problem - just!)

Many thanks in advance.....

28 Mar 2011, 9:58 PM
#2
kobra avatar

kobra

Black Belt

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

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Get the 3rd party addon for about us

It outlines the 8 files/edits required to create a new define page which is what you are attempting to do by changing all these thing for an existing define page

28 Mar 2011, 10:05 PM
#3
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Hi Kobra,

Many thanks for the reply. I know this sounds stupid, but I don't really know how to install add-ons. I'd be too worried about uploading the new files/folders to the server and trying to ensure each goes to the correct destination. I did try to install an add-on once when I ran my test site on a local server (MAMP), and managed to crash the whole thing!

Isn't there another way to change the 'Define Pages' URLs without having to go down the add-on route. After all, it was extremely easy to change the heading and nav bar titles to what I wanted - it's a bit frustrating for the URL change (to match these titles) to be so difficult to achieve!

Were the steps I followed (outlined in my original post) incorrect, and/or did I miss something out?

28 Mar 2011, 10:24 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Also look at the myDebug-xxx.log files to see what you've broken. Ref: https://www.zen-cart.com/tutorials/index.php?article=82

28 Mar 2011, 10:31 PM
#5
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

DrByte,

I'm sorry but I wouldn't understand how to use this, and am unable to install 3rd party add-ons (please see above).

Isn't there a straightforward way to change a Define Page URL, like there is to alter the heading/nav bar titles in the english.php file..?

28 Mar 2011, 11:23 PM
#6
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Please can anybody help with this - I'm tearing my hair out?!

I can't have my URLs written as /page_2 or /page_3 or /conditions etc...

Is there anyway to re-write the URL, without the text from the Define Page disappearing???

I'm must add that I'm pretty new to Zencart, so please bear this in mind if you reply...

Many thanks in advance...

29 Mar 2011, 7:51 PM
#7
donal avatar

donal

Zen Follower

Join Date:
Jan 2009
Location:
Ireland
Posts:
442
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

What is it exactly that you are trying to achieve?
just add more pages?

installing addons is much simplier than what you are trying to do.

29 Mar 2011, 10:17 PM
#8
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

I'm trying to change the URL name from /page_2 to /about_us; /page_3 to /links; page_4 to /size_guide and so on... It doesn't look neat to click on the size guide and have the URL say page_3 etc. It's confusing for users and it may have an effect on SEO too.

I managed to change the heading and nav bar titles with great ease, but altering the text in the english.php language file, and followed instructions I found on another thread (see original post) to change the page URL to page this. However, as already stated, my page is now blank when loaded into the web page - even though the relevant text displays fine when I edit it in 'Define Pages'.

Installing add-ons might be really easy for yourself to do, but I'm new to all this, so to me it seems a daunting task.

Can you help me to change the URL please..?

29 Mar 2011, 10:19 PM
#9
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

I meant 'by altering', not 'but altering'...

29 Mar 2011, 10:22 PM
#10
kobra avatar

kobra

Black Belt

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

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Installing add-ons might be really easy for yourself to do, but I'm new to all this, so to me it seems a daunting task.

Can you help me to change the URL please..?
If you require this alteration you need to roll your sleves up and follow what I posted in post #2

There is no other way to accomplish what you seek

30 Mar 2011, 4:09 PM
#11
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Thanks for the reply Kobra,

Are you absolutely sure I'd have to install the 'About Us' module. Does that mean that the instructions I followed in my original posts are irrelevant/false?

I'm pretty surprised at how few ZenCart users have raised this issue because surely nobody wants their URLs to read /page_2, /privacy, /page_4, /conditions and so on...?!

30 Mar 2011, 4:11 PM
#12
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Thanks for the reply Kobra,

Are you absolutely sure I'd have to install the 'About Us' module. Does that mean that the instructions I followed in my original posts are irrelevant/false?

I'm pretty surprised at how few ZenCart users have raised this issue because surely nobody wants their URLs to read /page_2, /privacy, /page_4, /conditions and so on...?!

30 Mar 2011, 9:05 PM
#13
kobra avatar

kobra

Black Belt

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

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Are you absolutely sure I'd have to install the 'About Us' module
I did not state that you have to install it

Just read and review it for what files and edits are required to create a new defines page
There is guidance in the readme

30 Mar 2011, 10:34 PM
#14
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

Thank you very much for this info Kobra - you're a lifesaver!

You're right - I found these instructions at the bottom of the 'READ ME' text file for this module, for anyone else who might be interested:

TO USE THIS PACKAGE FOR OTHER PAGES

It's easy to use this package as a model for other customizable pages.
Let's say you wanted to create another page called "mypage":

  • simply rename "about_us" in every filename or folder in this package to "mypage"
  • edit the extra_datafiles/mypage_filenames.php and change the define's by changing "ABOUT_US" and "about_us" to "MYPAGE" and "mypage" respectively.
  • edit modules/pages/ABOUT_US/header_php.php and change the "ABOUT_US" reference to "MYPAGE"
  • edit any of the language files as desired (some heading defines will need changes)

Upload to your server. To add links to a sidebox, see step #4 above.

Hopefully my problem will be solved now. Brilliant, and thanks once again..!

31 Mar 2011, 9:15 AM
#15
chevvychase81 avatar

chevvychase81

New Zenner

Join Date:
Mar 2011
Posts:
10
Plugin Contributions:
0

Re: Blank Web Pages after changing Page_2_3_4 URLs in Define Pages

I'd just like to confirm that the 'READ ME' instructions for the 'About Me' module work (see my cut & paste above) - enabling me to change my URL for any 'Define Page' to match my heading/nav-bar titles! The instructions I've posted work in conjunction with the step-by-step instructions at the top of the 'READ ME' text file.

For proof, see my website link:

http://www.apronheaven.co.uk/links

For good measure, I used the 'Developers Toolkit' in 'Tools' to find all instances of page_2, and altered these to 'About_Us', page_3 to 'Sizes' and so on and so forth (substitute these examples for whatever you'd like to change yourself)

Many thanks to Kobra once again for helping me with this issue which previously had me going round in circles for days..!