Forums / General Questions / where is the $tpl_page_body

where is the $tpl_page_body

Started by su35 on 15 Aug 2013, 1:48 AM · Views: 571

Results 1 to 5 of 5
15 Aug 2013, 1:48 AM
#1
su35 avatar

su35

Zen Follower

Join Date:
Oct 2011
Posts:
168
Plugin Contributions:
0

where is the $tpl_page_body

I got a error message said: No such file or directory in ...../includes/modules/pages/product_info/main_template_vars.php on line 182. Then checked the main_template_vars.php. The code on line 182 is```
require($template->get_template_dir($tpl_page_body,DIR_WS_TEMPLATE, $current_page_base,'templates'). $tpl_page_body);

15 Aug 2013, 7:09 AM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: where is the $tpl_page_body

su35:

I got a error message said: No such file or directory in ...../includes/modules/pages/product_info/main_template_vars.php on line 182. Then checked the main_template_vars.php. The code on line 182 is```
require($template->get_template_dir($tpl_page_body,DIR_WS_TEMPLATE, $current_page_base,'templates'). $tpl_page_body);


Did you install a non-standard template from a commercial source such as Template Monster?

Link to your site?

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

15 Aug 2013, 9:40 AM
#3
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: where is the $tpl_page_body

su35:

The code on line 182 is```
require($template->get_template_dir($tpl_page_body,DIR_WS_TEMPLATE, $current_page_base,'templates'). $tpl_page_body);


Although it **seems** apparent that this problem is due to a missing $tpl_page_body variable, we only have your word on that. It *could* be a redherring.  

The thing is, I've seen a problem similar to this during my time developing the ozpost module, and the cause has been because the constant DIR_WS_TEMPLATE hasn't been defined, and the reason for this is that this particular define doesn't exist in the ZenCart v1.3.7 configuration files, and many people that have upgraded from V1.3.7 to a later version have neglected to merge these changes during the upgrade, so when the newer modules/code try to use this constant, because it hasn't been defined the path to the file is incorrect and the result is the error message   "No such file or directory in ...."   

Sadly, you truncated the most import part of the error message..   specifically the part that tells us the file (and path) that is *actually* missing.  If you had done that I wouldn't have a need to speculate about this other possibility...      What I'm saying here is that that you will get the exact same *symptom* regardless of whether it is a missing $tpl_page_body variable or the undefined DIR_WS_TEMPLATE.  

 A closer inspection of the missing part of your log file should provide the answer as to which of these is the culprit (assuming that it isn't another cause entirely). 

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

15 Aug 2013, 3:27 PM
#4
su35 avatar

su35

Zen Follower

Join Date:
Oct 2011
Posts:
168
Plugin Contributions:
0

Re: where is the $tpl_page_body

Thanks frank18 and RodG

It's my failure. I had commented the assignment statement in one place.

15 Aug 2013, 8:55 PM
#5
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: where is the $tpl_page_body

su35:

Thanks frank18 and RodG

It's my failure. I had commented the assignment statement in one place.

Good to hear you have got this resolved.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.