Firefox PHP

error whenever closed topic is viewed

Posted by dsibilant 
error whenever closed topic is viewed
April 07, 2011 05:11AM
I'm using emerald template and the tree-view module. When a closed topic is view, there is no reply box, or a box saying replies aren't allowed, etc. The following is the error report.

Phorum Template Error
phorum_get_template() was called with an empty page name.
This might indicate a template problem.
Here's a backtrace that might help finding the error:
#0 phorum_get_template() called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/common.php:1599]
#1 phorum_output(Array ([0] => treeview::read_threads,[1] => )) called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/mods/treeview/treeview.php:192]
#2 mod_treeview_end_output()
#3 call_user_func(mod_treeview_end_output) called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/common.php:1887]
#4 phorum_hook(end_output) called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/common.php:1706]
#5 phorum_output(Array ([0] => read_threads,[1] => message)) called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/read.php:861]
Re: error whenever closed topic is viewed
April 07, 2011 06:16AM
That sounds like an error in the treeview module templates.
I guess that there is an {INCLUDE name} statement in the template, which should have been {INCLUDE "name"} (so with quotes).

The file to look at is mods/treeview/templates/emerald/read_threads.tpl


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: error whenever closed topic is viewed
April 07, 2011 06:45AM
Nope, I couldn't find the include name statement in any of the treeview templates. BTW, I use emerald with threaded display on all forums, with users not having a choice.
Re: error whenever closed topic is viewed
April 07, 2011 07:29AM
I suspect the mods/treeview/treeview.php file, which contains this line:
Language: PHP
$templates[] = $PHORUM["posting_template"];

The $PHORUM["posting_template"] variable is not always set. Try changing that line to:
Language: PHP
$templates[] = ';posting';;

That should fix the warning message. I didn't look too much into the logic of the script. Possibly, this does not result in the expected behavior (posting editor v.s. message box).


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: error whenever closed topic is viewed
April 08, 2011 03:15AM
this is the original line in the tree view module:
$template = $PHORUM["template"];

I tried each of the following. They each made the tree view disappear:
$template = 'posting';
$template = "posting";
$template = $PHORUM["posting"];
$template = $PHORUM['posting'];
$template = $PHORUM["posting_template"];
$template = $PHORUM['posting_template'];

I also get an error message if I leave a moved message when a post is moved. I imagine it's from the same error.
Re: error whenever closed topic is viewed
April 08, 2011 04:31AM
I copied the code from above right from the source code of the treeview module. Please lookup that exact code and modify it. The line that you edited is not the line that I was talking about.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: error whenever closed topic is viewed
April 08, 2011 04:46AM
I apologize. I've made the change and it kindof works.

It has a box that says the topic is closed. But then under that it has the start of a reply box. It has Author: then a box to fill in the subect.

then: mod_tos_tpl_editor_before_textarea(): Can't determine whether we're editing a new message.
Re: error whenever closed topic is viewed
April 08, 2011 06:45AM
From here on, I'm at a loss too. Two modules that I didn't write, so finding a solution would probably result in reading all the code, trying it out and fixing it in the end. Time's too limited for me at this moment to handle that.

Please file a bug report in the treeview module's thread. Maybe the module author can come up with a solution.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login