Gossamer Forum
Home : Products : Others : MySQLMan :

Template.pm Bug?

Quote Reply
Template.pm Bug?
Just downloaded and tried installing MySQLman to install onto a different server. It won't work.

However, if I use any older version of Template.pm with the installation it works.

The buggy one seems to be:

$Id: Template.pm,v 2.18 2001/09/07 19:54:26 jagerman Exp $

For some reason it keeps adding an extra path to the path already there. Sorry, my terminology is awful - but you should be able to see from the example shown. This is an example error message:

fatal undef error: GT::Template::Parser (22225): Unable to open template file './templates/./templates/database.html'. Reason: File does not exist. at GT/Template.pm line 300.

As you can see it is duplicating the path, or part of it, therefore all the template files can not be found.

Have you revised the code for Template.pm recently and this is a bug? Or is just me having problems with the installation.

Thanks

Wil

Last edited by:

Wil: Sep 19, 2001, 3:22 AM
Quote Reply
Re: [Wil] Template.pm Bug? In reply to
Just got the answer from:

http://www.gossamer-threads.com/...rum.cgi?post=148253;

Fixed the problem.

Cheers

- wil
Quote Reply
Re: [Wil] Template.pm Bug? In reply to
Apologies for my ignorance here, but which one of the posts provided the solution in that thread?

I am still getting the error:
fatal undef error: GT::Template::Parser (14137): Unable to open template file './templates/./templates/login.html'. Reason: File does not exist. at GT/Template.pm line 300.

I have tried all of the solutions suggested as well as I can, and all of them simply lead to further erros.

I presume that the module is actually broken, since so many people are companiing about it?

Can someone please provide a definitive answer to this problem?

Unsure
Post deleted by RedRum In reply to

Last edited by:

RedRum: Sep 19, 2001, 9:23 AM
Quote Reply
Re: [Wil] Template.pm Bug? In reply to
Ok, I've come up with a simple fix. Not the best way but it works.

In GT/Template/Parser.pm in sub load_template find:

my $full_file = $self->{root} . "/" . $file;

.....change it to:

my $full_file = $file;

It seems that GT/Template.pm is exactly the same file so you may need to do it in there also (not sure why there are two files the same).

Last edited by:

RedRum: Sep 19, 2001, 10:00 AM
Quote Reply
Re: [swisstony] Template.pm Bug? In reply to
swisstony

Here's the exact message within the thread that provides you with the answer:

http://www.gossamer-threads.com/...?post=148551;#148551

edit - you might have to copy and paste the above url into a browser window, as the forum software seems to cut off the last #148551 part.

[hint - oh how nice it would be to have message numbers next to posts so I don't have to trawl through the source code ;-)]

Try a clean installation and just read the above message and do exactly what it tells you. There are a lot of other threads around here telling you to change lines in Parser.pm and Template.pm. You could go down this route if you wished but it would mean changing about 6 similar lines of code, while the above solution works much 'cleaner' with less risk of messing things up, and only involves one simple change.

Kind rgds

- wil

Last edited by:

Wil: Sep 20, 2001, 1:39 AM
Quote Reply
Re: [Wil] Template.pm Bug? In reply to
I must be doing something stupidly wrong, because it makes absolutely no difference. I tried substituting the line into html.pl, but it made no difference at all - exactly the same error.

Thanks for trying though. Unsure
Quote Reply
Re: [swisstony] Template.pm Bug? In reply to
Try my method :)

Only make the change in GT/Template/Parser.pm
Quote Reply
Re: [RedRum] Template.pm Bug? In reply to
OK, well that's slightly better. I have changed three instances of

my $full_file = $self->{root} . '/' . $template

to

my $full_file = $file;

which seems the minimum amount necessary to get a change in error message type. Instead, I now get a proper MySQLman page, containing the following error:

Error loading required libraries

Reason: Global symbol "$file" requires explicit package name at GT/Template.pm line 274.
BEGIN not safe after errors--compilation aborted at GT/Template.pm line 366.


Any ideas? Your continuing help is much appreciatedCrazy
Quote Reply
Re: [swisstony] Template.pm Bug? In reply to
Sorry, above I said only change one occurance in Parser.pm - put Template.pm back to what it was.