Template->make_filename(): Error - file does not exist

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785

Template->make_filename(): Error - file does not exist

Postby NeoMort » Tue Oct 19, 2004 4:23 pm

I just recently installed a new template on my clan forum. Everything works except the RSS feed, which gives out the error: Template->make_filename(): Error - file does not exist. I should also point out that the RSS feed works perfectly on subsilver. Any ideas???


Neo ;)
NeoMort
Registered User
 
Posts: 5
Joined: Tue Oct 19, 2004 4:18 pm

Postby pentapenguin » Tue Oct 19, 2004 5:35 pm

Hi!
That sounds like a bug with the RSS Feed MOD.
You'll need to post over in its thread.
Support Resources: Support Request Template
My Sites: Download my phpBB MODs | pentapenguin.com
If you need professional assistance with your board, please contact me for my reasonable rates.
User avatar
pentapenguin
Former Team Member
 
Posts: 11032
Joined: Thu Jul 01, 2004 4:15 am
Location: GA, USA

Postby sonyboy » Tue Oct 19, 2004 9:32 pm

this will fix it:

Code: Select all
##############################################################
# Title: Template->make_filename Message Fix
# Author: Thoul  thoul@users.sourceforge.net  http://darkmods.sourceforge.net
# Description: Repairs broken functionality in template error message.
# Version: 1.0.0
#
# Installation Level: Easy
# Installation Time: 2 Minutes
# Files To Edit: includes/template.php
# Included Files: n/a
##############################################################
# Author's Notes:
# This is a quick hack to fix an error in the phpBB error message
# "Template->make_filename(): Error - file does not exist."  This error message is
# supposed to include the filename of the non-existent file, but this was broken in
# phpBB 2.0.4 and later versions.
#
# Please note that this fix is neither compatible with nor required in the eXtreme
# Styles hack or phpBB 2.0.0 - 2.0.3.
##############################################################
# BEFORE ADDING THIS TO YOUR FORUM, YOU SHOULD BACK UP ALL RELATED FILES.
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
includes/template.php

#
#-----[ FIND ]------------------------------------------
#
   function make_filename($filename)
   {
      // Check if it's an absolute or relative path.
      if (substr($filename, 0, 1) != '/')
      {
         $filename = phpbb_realpath($this->root . '/' . $filename);
      }

      if (!file_exists($filename))
      {
         die("Template->make_filename(): Error - file $filename does not exist");
      }

      return $filename;
   }

#
#-----[ REPLACE WITH ]------------------------------------------
#
   function make_filename($filename)
   {
      $old_filename = $filename;
      // Check if it's an absolute or relative path.
      if (substr($filename, 0, 1) != '/')
      {
         $old_filename = $this->root . '/' . $old_filename;
         $filename = phpbb_realpath($this->root . '/' . $filename);
      }

      if (!file_exists($filename))
      {
         if ( !$filename )
         {
            $filename = $old_filename;
         }
         die("Template->make_filename(): Error - file $filename does not exist");
      }

      return $filename;
   }

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# End
sonyboy
Registered User
 
Posts: 2980
Joined: Thu Oct 07, 2004 2:10 am

Postby NeoMort » Wed Oct 20, 2004 1:59 am

Tnx to both of you guys ;) ...it now works a treat :D

Neo ;)
NeoMort
Registered User
 
Posts: 5
Joined: Tue Oct 19, 2004 4:18 pm


Return to 2.0.x Support Forum

Who is online

Users browsing this forum: No registered users and 9 guests