In file sources/template.php on line 120:
E_NOTICE - Undefined variable: templates
How should I go about fixing this? I uploaded a theme, and switched to it and got this error when I tried to re log in.
Moderators: Gaia.
Page: 1
| Author | Post |
|---|---|
|
#1 Mon Oct 19, 2009 1:41 am
|
|
|
Member
Registered: Oct 2009
Posts: 11
Location: Ontario, Canada
|
In file sources/template.php on line 120:
E_NOTICE - Undefined variable: templates How should I go about fixing this? I uploaded a theme, and switched to it and got this error when I tried to re log in. |
|
#2 Mon Oct 19, 2009 6:09 am
|
|
|
Developer
Registered: Apr 2004
Posts: 2247
Location: Belgium
|
Most likely the template has faulty information. To be more specific, it seems global.tpl.php does not contain the $templates variable.
Where did you get the template from? |
|
#3 Mon Oct 19, 2009 11:29 am
|
|
|
Member
Registered: Oct 2009
Posts: 11
Location: Ontario, Canada
|
|
|
#4 Mon Oct 19, 2009 11:50 am
|
|
|
Developer
Registered: Apr 2004
Posts: 2247
Location: Belgium
|
It works for me. The template seems fine.
Are you sure all the files have uploaded correctly? « Last edit by Dietrich on Mon Oct 19, 2009 11:55 am. » |
|
#5 Mon Oct 19, 2009 1:39 pm
|
|
|
Member
Registered: Oct 2009
Posts: 11
Location: Ontario, Canada
|
There was no read-me included so I followed how the defualt was uploaded.
So... I installed the root template folder to the templates folder. Did I go about doing it wrong? |
|
#6 Mon Oct 19, 2009 2:32 pm
|
|
|
Developer
Registered: Apr 2004
Posts: 2247
Location: Belgium
|
It should work with the template folder in templates/, thus there should be templates/<name>/global.tpl.php and all the other files.
Try altering line 118 in sources/template.php to include($templates_file); If this doesn't work I suspect it's either a permission issue that is not detected or actually a bug. Thus make sure all the PHP files for the template are readable (CHMOD in FTP). |
|
#7 Mon Oct 19, 2009 2:35 pm
|
|
|
Member
Registered: Oct 2009
Posts: 11
Location: Ontario, Canada
|
I'm not new to forums so I've already gone through the generic issues that I have encountered throughout my time with template errors.
I'm pretty sure I've already checked if it's CHMOD'd correctly. I beleive it's 644. I will edit the file when I get into my Computer Sciences class, right now I'm finishing up some work. Dietrich, I appreciate the prompt responses and help. |
|
#8 Mon Oct 19, 2009 3:15 pm
|
|
|
Member
Registered: Oct 2009
Posts: 11
Location: Ontario, Canada
|
Didn't work, still has the same outcome.
Line 20 = $this->templates[$section] = $templates; I commented out but it said my global index was undefined. Hmm. « Last edit by btraill on Mon Oct 19, 2009 3:23 pm. » |
|
#9 Mon Oct 19, 2009 5:55 pm
|
|
|
Developer
Registered: Apr 2004
Posts: 2247
Location: Belgium
|
You can't comment the line out since it puts the contents of the $templates variable in the template object.
I really can't figure out what would be the cause of this. Have you tried any other templates? |
|
#10 Mon Oct 19, 2009 6:51 pm
|
|
|
Member
Registered: Oct 2009
Posts: 11
Location: Ontario, Canada
|
Heh, problem is : I can't even access my forum in general, not even the admin.php page.
Should I re-install? |
|
#11 Mon Oct 19, 2009 7:15 pm
|
|
|
Developer
Registered: Apr 2004
Posts: 2247
Location: Belgium
|
Just renaming the template's directory should be enough.
|
|
#12 Mon Oct 19, 2009 7:19 pm
|
|
|
Member
Registered: Oct 2009
Posts: 11
Location: Ontario, Canada
|
Renamed it, deleted it, restored it, everything...
I get: In file sources/template.php on line 116: E_USER_ERROR - Unable to load global templates file for set "CesarDesign01"! Everytime. |
|
#13 Mon Oct 19, 2009 7:39 pm
|
|
|
Developer
Registered: Apr 2004
Posts: 2247
Location: Belgium
|
You have set it as the default template. Set the template config value in config.php to "default".
|
|
#14 Mon Oct 19, 2009 8:02 pm
|
|
|
Member
Registered: Oct 2009
Posts: 11
Location: Ontario, Canada
|
Thanks
Dietrich, man, your coding is by far the most efficient and easy to understand out of forum software. |
|
#15 Tue Oct 20, 2009 8:04 am
|
|
|
Developer
Registered: Apr 2004
Posts: 2247
Location: Belgium
|
Don't know if you're being sarcastic
, but UseBB 1's code has become a mess in a quite fast period of time. There are also a number of design flaws (http://sourceforge.net/apps/trac/usebb/wiki/UseBB1DesignFlaws) that I wish to resolve in UseBB 2.Hope you tried with another template set, there must have been something wrong with the files. |
Page: 1
UseBB Community is powered by UseBB 1 Forum Software