-
Main Page Text Gone!!!
Hi
Just realised that the the intro text on my homepage is no longer there. I added it using the Define Page Editor and it has been fine. Could I have done something for it to not be there!
http://ethicalpartybags.com
Any help would be really appreciated.
Thanks
Matt
-
Re: Main Page Text Gone!!!
When you open define_main_page.php, either in the editor or by downloading the file is the text there?
-
Re: Main Page Text Gone!!!
Yes it is all there.
Matt
-
Re: Main Page Text Gone!!!
Hi
I still have not worked out why the text above the category images on my homepage has gone. The text is in define_main_page.php.
http://www.ethicalpartybags.com
Anyone have any ideas?
Thanks
Matt
-
Re: Main Page Text Gone!!!
It looks like your template has it commented out ... :eek:
Peek in the View Source of the page and you will see:
Code:
<!-- deprecated - to use - uncomment
<div id="" class="content">This is the main define statement for the page for english when no template defined file exists. It is located in: <strong>/includes/languages/english/index.php</strong></div>
-->
<!-- deprecated - to use - uncomment
<div id="" class="content">Helo.</div>
-->
-
Re: Main Page Text Gone!!!
Thanks Ajeh for the reply.
How could this have happened as i have not done anything?
Also:
Which file do I need to change this?
Thanks
Matt
-
Re: Main Page Text Gone!!!
Go to your Zen Cart Admin and in the Tools ... Developers Tool Kit ... in the bottom input box do a search on:
deprecated
in the Catalog ... and click search ...
This should help you find which files have the code commented out ...
-
Re: Main Page Text Gone!!!
Hi
I've found the file - tpl_index_categories.php and know I get this appearing on the homepage.
This is the main define statement for the page for english when no template defined file exists. It is located in: /includes/languages/english/index.php
-->
Helo.
-->
Any ideas?
Matt
-
Re: Main Page Text Gone!!!
In HTML the way to comment out something is to mark it by surrounding what you do not want to show with HTML comment marks:
Quote:
<!-- anything here will not show -->
From the looks of it, you have things commented out with HTML comment marks so it is not showing ...
If you were to remove the HTML comment marks, then the text would show on the page ...
-
Re: Main Page Text Gone!!!
This same behavior happened to the site I am developing, without me having manually commented anything out. Very odd. I think it might be linked to the Open With Category setting under Layout Settings - because I noticed that my entire page disappeared after toggling that setting to 0. Investigating further...
-
Re: Main Page Text Gone!!!
Thanks. let me know if you have any luck.
Matt
-
Re: Main Page Text Gone!!!
I have removed all the HTML marks and it still does not work. I have now put them back as it is better to have no text there rather than some funny error message.
Can anyone tell me the exact bits I am meant to remove? I have removed the uncomment text and the html arrows.
Thanks
matt
-
Re: Main Page Text Gone!!!
I'd remove these:
Code:
<!-- deprecated - to use - uncomment
<div id="" class="content">This is the main define statement for the page for english when no template defined file exists. It is located in: <strong>/includes/languages/english/index.php</strong></div>
-->
-
Re: Main Page Text Gone!!!
That code is supposed to be commented out. The call in the code for the define page info is:
Code:
<?php
/**
* get the Define Main Page Text
*/
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
<?php } ?>
in the includes/templates/default_template/templates/tpl_index_default.php
verify that code is there and then we can work on why that code is not calling the define page in correctly
-
Re: Main Page Text Gone!!!
Hi
Just checked the file and it seems to all be there - see below:
<?php
/**
* Page Template
*
* Main index page<br />
* Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br />
* Centerboxes are called as necessary
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_index_default.php 3464 2006-04-19 00:07:26Z ajeh $
*/
?>
<div class="centerColumn" id="indexDefault">
<h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
<?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?>
<!-- deprecated - to use uncomment this section
<?php if (TEXT_MAIN) { ?>
<div id="" class="content"><?php echo TEXT_MAIN; ?></div>
<?php } ?>-->
<!-- deprecated - to use uncomment this section
<?php if (TEXT_INFORMATION) { ?>
<div id="" class="content"><?php echo TEXT_INFORMATION; ?></div>
<?php } ?>-->
<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
<?php
/**
* get the Define Main Page Text
*/
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
<?php } ?>
<?php
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
while (!$show_display_category->EOF) {
?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?>
<?php
/**
* display the Featured Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
/**
* display the Special Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?>
<?php
/**
* display the New Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?>
<?php
/**
* display the Upcoming Products Center Box
*/
?>
<?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
<?php
$show_display_category->MoveNext();
} // !EOF
?>
<
Thanks
Matt
-
Re: Main Page Text Gone!!!
This is probably a silly question-
Is it enabled under Configuration/Define Page Status?
-
Re: Main Page Text Gone!!!
Hi Doug
Not a silly question as I'm no expert. It is set to 1, which I think is the correct setting.
Matt
-
Re: Main Page Text Gone!!!
I figured out the issue. It was just the wrong permissions on the directories and files inside of languages/english. I found the following thread which reported similar errors I was having:
http://www.zen-cart.com/forum/showthread.php?t=92363
I went back in and realized my html_includes directory and my overrides folder were both closed off and not writable at all. Once I changed them to 777 my main text started appearing again.
-
Re: Main Page Text Gone!!!
@Jacdesigner
To edit any of the define_pages files you must change your permissions to 777 prior to editing, then when finished change them back to 644.
They do not need to be at 777 to be read by ZenCart if not editing.
Correct me if I'm wrong, but correct permissions are directories at 755 and files at 644.
-
Re: Main Page Text Gone!!!
I'm not sure that this will solve my problem as the text for the main page is in the define main page file and so it is writeable!!
Matt
-
Re: Main Page Text Gone!!!
Matt,
I doubt the permissions were the cause of your problem.
I know you've probably tried everything but I know you were trying to split your main page - are any of those attempts coming back to haunt you?
If you change your template to the default, do you get the main page text?
-
Re: Main Page Text Gone!!!
Hi
Thanks for the tip. I never did fully resolve the 2 sections of text on the homepage - you may well be right about the fiddling around coming back to haunt me! When i switch to the default template i still get no text.
I thought of a possible solution: If I switch the Welcome Message on in Admin-Config-layout settings then I get the following text "Welcome Guest! Would you like to log yourself in?". Could I replace this text with the text about my site that i wanted? I tried searching for this text in the Developer Tools, but could not find the file?
What do you think?
Matt
-
Re: Main Page Text Gone!!!
Compare your includes/template/YOURTEMPLATE/templates/tpl_index_default.php file against the ZenCart original located in includes/templates/default_template.
That is the file that you were editing trying to get your page split. Make sure the file in the default directory is the unedited, original version. If not, upload a fresh copy from the ZenCart download zip and see where your at.
-
Re: Main Page Text Gone!!!
Hi
There is no index default file in my custom template, but there is one in my default folder. It looks like this;
<?php
/**
* Page Template
*
* Main index page<br />
* Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br />
* Centerboxes are called as necessary
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_index_default.php 3464 2006-04-19 00:07:26Z ajeh $
*/
?>
<div class="centerColumn" id="indexDefault">
<h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
<?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?>
<!-- deprecated - to use uncomment this section
<?php if (TEXT_MAIN) { ?>
<div id="" class="content"><?php echo TEXT_MAIN; ?></div>
<?php } ?>-->
<!-- deprecated - to use uncomment this section
<?php if (TEXT_INFORMATION) { ?>
<div id="" class="content"><?php echo TEXT_INFORMATION; ?></div>
<?php } ?>-->
<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
<?php
/**
* get the Define Main Page Text
*/
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
<?php } ?>
<?php
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
while (!$show_display_category->EOF) {
?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?>
<?php
/**
* display the Featured Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
/**
* display the Special Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?>
<?php
/**
* display the New Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?>
<?php
/**
* display the Upcoming Products Center Box
*/
?>
<?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
<?php
$show_display_category->MoveNext();
} // !EOF
?>
<
Should the "uncomment bits " be there?
Matt:(
-
Re: Main Page Text Gone!!!
I didn't do a line by line compare but if this the unaltered file then it's good.
Just for the heck of it, copy the text on your define_main_page file to notepad, clear the text from the page, resave it, then re-enter the text back and save. Maybe some corruption on your define_main_page??
Maybe upload a backup copy of define_main_page from before the disappearance happened.
Stranger things have happened.
-
Re: Main Page Text Gone!!!
Doug
No luck. So I have temporarily got round the issue by enabling the Welcome message in Admin and changing the text.
Thanks for all your help.
Matt