Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Bug - post view error

Quote Reply
Bug - post view error
Got installed, after updating my templates I get an error when attempting to view a post.

Can't call method "fetchrow" on an undefined value at e:/heavybombers.com/heavybombers/forums/admin/GForum/Post/View.pm line 466.


Debug details:

from GForum::Post::View::view_flat at ..edited_out/forums/admin/GForum/Post/View.pm line 71
GT::SQL::Driver::ODBC::sth (3360): Executing query: SELECT post_id,post_time,forum_id_fk,user_id_fk FROM gforum_Post WHERE post_root_id = 52978
ORDER BY post_time ASC from GForum::Post::View::view_flat at ..edited_out/forums/admin/GForum/Post/View.pm line 98
GT::SQL::Driver::ODBC::sth (3360): Executing query:
SELECT *
FROM gforum_Category, gforum_Forum
WHERE gforum_Forum.cat_id_fk = gforum_Category.cat_id AND (gforum_Forum.forum_id = '21')

from GForum::Post::View::view_flat at ..edited_out/forums/admin/GForum/Post/View.pm line 123
GT::SQL::Table (3360): Creating new GT::SQL::Tree object for table gforum_Category at GT::SQL::Table::tree line 1476.
GT::SQL::Driver::ODBC::sth (3360): Executing query: SELECT cat_id,cat_name FROM gforum_Category WHERE ( cat_id = 6 ) from GForum::Category::_full_name_cache at ..edited_out/forums/admin/GForum/Category.pm line 141
GT::SQL::Driver::ODBC::sth (3360): Executing query:
SELECT gforum_Category.cat_id, gforum_Category.cat_name, gforum_Category_tree.tree_id_fk, gforum_Category.cat_depth
FROM gforum_Category, gforum_Category_tree
WHERE gforum_Category_tree.tree_anc_id_fk = gforum_Category.cat_id AND (gforum_Category_tree.tree_id_fk = '6')

from GForum::Category::_full_name_cache at ..edited_out/forums/admin/GForum/Category.pm line 143
GT::SQL::Driver::ODBC::sth (3360): Executing query:
SELECT TOP 24 *
FROM gforum_Post LEFT OUTER JOIN gforum_User ON gforum_Post.user_id_fk = gforum_User.user_id
WHERE (gforum_Post.post_root_id = '52978')
ORDER BY post_time ASC
from GForum::Post::View::view_flat at ..edited_out/forums/admin/GForum/Post/View.pm line 181
GT::SQL::Driver::ODBC::sth (3360): Executing query: SELECT COUNT(*) FROM gforum_Post WHERE post_root_id = 52978 from GForum::Post::View::view_flat at ..edited_out/forums/admin/GForum/Post/View.pm line 182
GT::SQL::Driver::ODBC::sth (3360): Executing query: SELECT post_thread_views,post_id_fk FROM gforum_PostView WHERE post_id_fk = 52978 from GForum::Post::View::view_flat at ..edited_out/forums/admin/GForum/Post/View.pm line 232
GT::SQL::Driver::ODBC::sth (3360): ExecutingContent-type: text/html

<p><font face='Tahoma,Arial,Helvetica' size=2>A fatal error has occurred:</font></p><blockquote><pre>Can't call method "fetchrow" on an undefined value at ..edited_out/forums/admin/GForum/Post/View.pm line 466.
</pre></blockquote><p><font face='Tahoma,Arial,Helvetica' size=2>Please enable debugging in setup for more details.</font></p>
<pre><b>Stack Trace</b>
======================================
GForum (3360): GForum::Post::View::next_prev called at ..edited_out/forums/admin/GForum/Post/View.pm line 270 with no arguments.
GForum (3360): GForum::Post::View::view_flat called at ..edited_out/forums/admin/GForum.pm line 296 with arguments
&nbsp; &nbsp; (GForum::Post::View, post_view_flat, HASH(0x22f49f0)).
GForum (3360): GForum::_plg_do_func_2 called at ..edited_out/forums/admin/GForum.pm line 260 with arguments
&nbsp; &nbsp; (post_view_flat).
GForum (3360): GForum::__ANON__ called at ..edited_out/forums/admin/GT/Plugins.pm line 112 with arguments
&nbsp; &nbsp; (post_view_flat).
GForum (3360): GT::Plugins::dispatch called at ..edited_out/forums/admin/GForum.pm line 260 with arguments
&nbsp; &nbsp; (GT::Plugins, ..edited_out/forums/admin/Plugins/GForum, do_post_view_flat, CODE(0x1a3c230), post_view_flat).
GForum (3360): GForum::_plg_do_func called at ..edited_out/forums/admin/GForum.pm line 251 with arguments
&nbsp; &nbsp; (post_view_flat).
GForum (3360): GForum::__ANON__ called at ..edited_out/forums/admin/GT/Plugins.pm line 112 with arguments
&nbsp; &nbsp; (post_view_flat).
GForum (3360): GT::Plugins::dispatch called at ..edited_out/forums/admin/GForum.pm line 251 with arguments
&nbsp; &nbsp; (GT::Plugins, ..edited_out/forums/admin/Plugins/GForum, do_func, CODE(0x1a3f9b4), post_view_flat).
GForum (3360): GForum::do_func called at ..edited_out/forums/admin/GForum/Post/View.pm line 43 with arguments
&nbsp; &nbsp; (post_view_flat).
GForum (3360): GForum::Post::View::view called at ..edited_out/forums/admin/GForum.pm line 296 with arguments
&nbsp; &nbsp; (GForum::Post::View, post_view, HASH(0x22f4930)).
GForum (3360): GForum::_plg_do_func_2 called at ..edited_out/forums/admin/GForum.pm line 260 with arguments
&nbsp; &nbsp; (post_view).
GForum (3360): GForum::__ANON__ called at ..edited_out/forums/admin/GT/Plugins.pm line 112 with arguments
&nbsp; &nbsp; (post_view).
GForum (3360): GT::Plugins::dispatch called at ..edited_out/forums/admin/GForum.pm line 260 with arguments
&nbsp; &nbsp; (GT::Plugins, ..edited_out/forums/admin/Plugins/GForum, do_post_view, CODE(0x1a3c230), post_view).
GForum (3360): GForum::_plg_do_func called at ..edited_out/forums/admin/GForum.pm line 251 with arguments
&nbsp; &nbsp; (post_view).
GForum (3360): GForum::__ANON__ called at ..edited_out/forums/admin/GT/Plugins.pm line 112 with arguments
&nbsp; &nbsp; (post_view).
GForum (3360): GT::Plugins::dispatch called at ..edited_out/forums/admin/GForum.pm line 251 with arguments
&nbsp; &nbsp; (GT::Plugins, ..edited_out/forums/admin/Plugins/GForum, do_func, CODE(0x1a3f9b4), post_view).
GForum (3360): GForum::do_func called at ..edited_out\forums\gforum.cgi line 141 with arguments
&nbsp; &nbsp; (post_view).
GForum (3360): main::main called at ..edited_out/forums/admin/GT/Plugins.pm line 112 with no arguments.
GForum (3360): GT::Plugins::dispatch called at ..edited_out\forums\gforum.cgi line 22 with arguments
&nbsp; &nbsp; (GT::Plugins, ..edited_out/forums/admin/Plugins/GForum, main, CODE(0x235dfc8)).


<b>System Information</b>
======================================
Perl Versio query: UPDATE gforum_PostView SET post_thread_views = post_thread_views + 1 WHERE post_id_fk = 52978 from GForum::Post::View::view_flat at ..edited_out/forums/admin/GForum/Post/View.pm line 232
GT::SQL::Driver::ODBC::sth (3360): Executing query: SELECT post_views,post_id_fk FROM gforum_PostView WHERE ( post_id_fk IN (52978) ) from GForum::Post::View::view_flat at ..edited_out/forums/admin/GForum/Post/View.pm line 234
GT::SQL::Driver::ODBC::sth (3360): Executing query: UPDATE gforum_PostView SET post_views = post_views + 1 WHERE post_id_fk IN (52978) from GForum::Post::View::view_flat at ..edited_out/forums/admin/GForum/Post/View.pm line 234
GT::SQL::Driver::ODBC::sth (3360): Executing query: SELECT post_id_fk,post_views,post_thread_views FROM gforum_PostView WHERE post_id_fk = 52978 from GForum::Post::_plg_normalize at ..edited_out/forums/admin/GForum/Post.pm line 369
GT::SQL::Driver::ODBC::sth (3360): Executing query: SELECT forum_id_fk,user_id_fk FROM gforum_ForumModerator WHERE forum_id_fk = 21 from GForum::Post::_plg_normalize at ..edited_out/forums/admin/GForum/Post.pm line 385
GT::SQL::Driver::ODBC::sth (3360): Executing query: SELECT post_id FROM gforum_Post WHERE post_sticky = 0 AND post_moved IS NULL AND forum_id_fk = 21 AND post_root_id = 0 AND post_latest_reply = 946632913 from GForum::Post::View::next_prev at ..edited_out/forums/admin/GForum/Post/View.pm line 436
GT::SQL::Driver::ODBC::sth (3360): Executing query: SELECT MAX(post_latest_reply) FROM gforum_Post WHERE ( post_latest_reply < 946632913 AND post_root_id = 0 AND forum_id_fk = 21 AND post_moved IS NULL AND post_sticky = 0 ) from GForum::Post::View::next_prev at ..edited_out/forums/admin/GForum/Post/View.pm line 466
GT::SQL::Table (3360): Failed to execute query: 'SELECT MAX(post_latest_reply) FROM gforum_Post WHERE ( post_latest_reply < ? AND post_root_id = ? AND forum_id_fk = ? AND post_moved IS ? AND post_sticky = ? ) ' Reason: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '@P4'. (SQL-37000)
[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL-37000)(DBD: st_execute/SQLExecute err=-1) at ..edited_out/forums/admin/GT/SQL/Driver/ODBC.pm line 409.
Can't call method "fetchrow" on an undefined value at ..edited_out/forums/admin/GForum/Post/View.pm line 466.
n: v5.6.1
Gossamer Forum Version: 1.2.0
GForum.pm version: 1.128
GT::SQL Version: 1.099
GT::Template Version: 2.094
DBI.pm Version: 1.201
@INC =
..edited_out/forums/admin
E:/Perl/lib
E:/Perl/site/lib
.
GT::SQL::error = Failed to execute query: 'SELECT MAX(post_latest_reply) FROM gforum_Post WHERE ( post_latest_reply < ? AND post_root_id = ? AND forum_id_fk = ? AND post_moved IS ? AND post_sticky = ? ) ' Reason: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '@P4'. (SQL-37000)
[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL-37000)(DBD: st_execute/SQLExecute err=-1)

Last edited by:

ArmyAirForces: May 24, 2003, 12:21 AM
Quote Reply
Re: [ArmyAirForces] Bug - post view error In reply to
Anybody else with this error?

Last edited by:

ArmyAirForces: May 24, 2003, 2:05 PM
Quote Reply
Re: [ArmyAirForces] Bug - post view error In reply to
I've tracked this down and fixed it up - anyone who download the installation .tar.gz file after this post is fine; people encountering the error can either redownload, or replace admin/GT/SQL/Condition.pm with the attached file.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com