Jump to content



Latest News: (loading..)

Changing default template breaks the shop (Missing Template Files?)


This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#-19   shamanix

shamanix
  • Members
  • 13 posts

Posted 15 March 2009 - 02:33 AM

If you use admin: templates -> templates to change the default template (to the table base one) then you receive the following warnings in the admin section
Notice: Undefined index: configuration in /web/admin/includes/applications/templates/templates.php on line 45

Warning: Cannot modify header information - headers already sent by (output started at /web/admin/includes/applications/templates/templates.php:45) in /web/admin/includes/functions/general.php on line 46

It still changes the default template but you need to navigate off the screen and back to see the change.
When you go to the shop front you will see plenty of errors all nicely laid out in a table format.  I gather this is becaue there are some files missing from the template directory.  Did my installation silently fail or are they missing from all installs.

Sample Error received when viewing the shop after changing the default template is:
Warning: include(templates/table_based/modules/boxes/categories.php) [function.include]: failed to open stream: No such file or directory in /web/templates/table_based.php on line 108


Thanks
Jandy

#-18   kcobain

kcobain
  • Members
  • 2 posts

Posted 16 March 2009 - 01:47 PM

Hi, i an error changing the template on the admin side.

Error reporting on the admin side:

( ! ) Notice: Undefined index: configuration in /var/www/oscommerce/admin/includes/applications/templates/templates.php on line 45
Call Stack
# Time Memory Function Location
1 0.0003 68932 {main}( ) ../index.php:0
2 0.1589 2103116 osC_Template_Admin::setup( ) ../index.php:39
3 0.1590 2103760 osC_Application_Templates->__construct( ) ../template.php:31

and the second error:

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /var/www/oscommerce/admin/includes/applications/templates/templates.php:45) in /var/www/oscommerce/admin/includes/functions/general.php on line 46
Call Stack
# Time Memory Function Location
1 0.0003 68932 {main}( ) ../index.php:0
2 0.1589 2103116 osC_Template_Admin::setup( ) ../index.php:39
3 0.1590 2103760 osC_Application_Templates->__construct( ) ../template.php:31
4 0.1787 2112052 osc_redirect_admin( ) ../templates.php:53
5 0.1787 2112052 header ( ) ../general.php:46

#-17   kcobain

kcobain
  • Members
  • 2 posts

Posted 23 March 2009 - 01:34 PM

Problem solved....

to anyone that have the same problem:

you have access to php.ini, set:

output_buffering=on;

restart your webserver and its done.

#-16   slicks

slicks
  • Members
  • 25 posts

Posted 15 July 2009 - 12:40 PM

Hi,

is there a solution possible if u habe no acces to the php.ini on the webserver?

#-15   ecartz

ecartz
  • Community Sponsor
  • 1,956 posts

Posted 15 July 2009 - 04:11 PM

View Postslicks, on Jul 15 2009, 08:40 AM, said:

is there a solution possible if u habe no acces to the php.ini on the webserver?
In a .htaccess, try
php_flag output_buffering on
How to change configuration settings in PHP
Always backup before making changes.