View Full Version : BTS 1.2/Max1.5.5 warning & fatal error

05-11-2004, 03:55 PM
I have a clean install of OSCMax 1.5.5 and bts1.2 upgrade with OptionType contrib.

The store works fine except when I complete the install for bts and remove the 3 lines from configure.php than I get this message.

Warning: main(DIR_WS_TEMPLATESmain_page.tpl.php): failed to open stream: No such file or directory in /home/tourname/public_html/shop/index.php on line 159

Fatal error: main(): Failed opening required 'DIR_WS_TEMPLATESmain_page.tpl.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/townsuk/www/include/sessions') in /home/tourname/public_html/shop/index.php on line 159

First. the settings in admin are fine... change=true and dir=aabox. The sql file is run and I confirmed all files are uploaded (in fact I re-uploaded it).

With the code still in the config file the site displays but when you remove the code all you get is the above error. However, you cannot change the template. no matter what I put in as the default template path in the admin the aabox template shows.

Note the different paths? the home/townsuk is not on my host. I did a search through my site and cant find any /townsuk/ code anywhere. Where is this coming from?

I have been using OSC and OSCMax for a while now and I have never had the problems I have lately. between the option type (though it is my fault trying to install the ms2 version and not the max version) and this template issue I am having a hard time not losing my shorts configging stores for customers.

Please help me to regain my sanity!

05-11-2004, 04:03 PM
Ok I confirmed that it is using the main_page.tpl.php in the root of the templates folder...

what does that mean?

05-11-2004, 08:02 PM
You missed a step. You have not defined DIR_WS_TEMPLATES

It is defined in /includes/configure.bts.php. Either you are missing this file, or you have not defined it in application_top.php

05-12-2004, 12:17 PM
Well after a long time tearing my hair out it turned out it was missing files... lots and lots of missing and corrupt files.

Got it going now.


06-22-2004, 04:35 PM
Warning: main(templates/main_page.tpl.php): failed to open stream: No such file or directory in /home/ypayret/public_html/katalog/index.php on line 159

Fatal error: main(): Failed opening required 'templates/main_page.tpl.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/public_html/katalog/index.php on line 159

++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++

I get this same error now. I uploaded all files three times (all files in the catalog/includes folder and catalog/templates folder). All files seem to have uploaded properly. This is a clean install with no changes or added features to max 1.5.5 except for this upgrade.
Ive removed my old templates folder, renamed it and put it in the templates folder. (i have no custom templates yet)
Ive executed the BTS.sql
Ive checked application_top: configure_bts is included
Ive checked configure_bts: its there
Ive removed the lines required out of configure.php
Template Switching Allowed : is True
Default Template: aabox

With this upgrade added their is no 'templates/main_page.tpl.php' , however, there is 'templates/common_top_bts.php'

It seems as if this file is not being called even though its defined and included in the right places.

Any suggestions, help or thoughts would be appreciated.


Second, if i put 'templates/main_page.tpl.php' back, it works except for the template switching. It doesnt show.
When i put in the required (IF statement) the template switcher shows but it is not functional, it stays aabox no matter what i click.

I do understand that this second set-up is not correct but its the only way i can see something.

Thanks in advance for any help and for taking the time to read my post

06-22-2004, 05:27 PM
I've recently had a lot of problems with ftp. It seems to be dropping a lot of files when uploading MAX, or other packages. I don't know why it's doing it, but I've tried 3 different ftp programs and all of them seem to be dropping files, and causing me problems just like the one's above. I find I have to upload the packages one folder at a time to get them to get all the files through.

06-22-2004, 05:46 PM
I noticed that too. My fourth attempt, i downloaded each file in every folder one at a time, this took awhile, but i thought it was worht it, V1.5, v1.5.5 upgrade, and bts2a upgrade.

I have done many modification to my current web site.

I have ms2.2 heavily moded SEC(linda mcgrath) version with about 20 additional mods I added such as ebay other stuff.
I have ossuite for wholesale which ive been converting ms2.2 mods for it.
Just happend to come accross this and like it because of the template system and its flexibility. I figured i could transfer my current mods to it

Now im not a programmer or tech , I just catch on to things very quickly. So i been able to figure out problems, however, with this one i see its defined and included where it suppose to be and it should work. I was hoping to get this up a going and participate in making it better.

06-22-2004, 09:30 PM
Help! Help! Help!

An suggestion for the above post. Are there any files possible missing?

Ive be going in circles and dont see the problem.
all seem to be fine, but the same error continues to appear.

06-22-2004, 09:53 PM
you wouldnt believe me if i told you. all of a sudden it just started working.

now time to move on w other modifications.

08-30-2004, 08:28 AM
is it just really unstable? one minute i was adding categories and then wham.

Warning: main(templates/DIR_WS_TEMPLATES/main_page.tpl.php): failed to open stream: No such file or directory in /home/kids/public_html/catalog/index.php on line 159

Warning: main(templates/DIR_WS_TEMPLATES/main_page.tpl.php): failed to open stream: No such file or directory in /home/kids/public_html/catalog/index.php on line 159

Fatal error: main(): Failed opening required 'templates/DIR_WS_TEMPLATES/main_page.tpl.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kids/public_html/catalog/index.php on line 159

bloody annoying.

08-30-2004, 09:06 AM
it appears to be that when i switched the key to false for allow template change that this is what happened. that option is evil and should be removed. ok, so its not evil but i just wasted about 30min stuffing around trying to figure out what i did wrong. garrr

09-08-2004, 07:07 PM
same with me, when I switched the 'Template Switching Allowed' option in My Store to false, i got the same error. this might be a hack, but i was able to fix this bug by changing /catalog/includes/application_top.php



01-15-2005, 09:47 AM

That is the fix for this. This bug was introduced by one of my updates. It will be fixed in a maintenance release shortly.