Im getting an error trying to view any reviews with;
<%if Review_Count%>
a href="<%db_cgi_url%>/review.cgi?ID=<%ID%>">Read <%Review_Count%>Comment(s)</a>
<%endif%>
Error:
A fatal error has occured:
Can't call method "fetchrow_hashref" on an undefined value at /home/www/mydomian.com/cgi-bin/gallery/admin/Links/User/Review.pm line 114.
Please enable debugging in setup for more details.
Stack Trace
======================================
Links (26208): Links::environment called at /home/www/mydomian.com/cgi-bin/gallery/admin/Links.pm line 431 with no arguments.
Links (26208): Links::fatal called at /home/www/mydomian.com/cgi-bin/gallery/admin/Links/User/Review.pm line 114 with arguments
(Can't call method "fetchrow_hashref" on an undefined value at /home/www/mydomian.com/cgi-bin/gallery/admin/Links/User/Review.pm line 114.
).
Links (26208): Links::User::Review::review_search_results called at /home/www/mydomian.com/cgi-bin/gallery/admin/GT/Plugins.pm line 108 with no arguments.
Links (26208): GT::Plugins::dispatch called at /home/www/mydomian.com/cgi-bin/gallery/admin/Links/User/Review.pm line 32 with arguments
(GT::Plugins, /home/www/mydomian.com/cgi-bin/gallery/admin/Plugins, review_search, CODE(0x825305c)).
Links (26208): Links::User::Review::handle called at /home/www/mydomian.com/cgi-bin/gallery/admin/GT/Plugins.pm line 108 with no arguments.
Links (26208): GT::Plugins::dispatch called at review.cgi line 25 with arguments
(GT::Plugins, /home/www/mydomian.com/cgi-bin/gallery/admin/Plugins, handle_review, CODE(0x822fda4)).
System Information
======================================
Perl Version: 5.006001
Links SQL Version: 2.1.2
DBI.pm Version: 1.21
Persistant Env: mod_perl (0) SpeedyCGI (0)
GT::SQL::error = Failed to execute query: 'SELECT * FROM lsql_gallery_Reviews WHERE ( Review_LinkID = ? AND Review_Validated = ? )
ORDER BY Custom column desc
LIMIT 0, 5' Reason: You have an error in your SQL syntax near 'column desc
LIMIT 0, 5' at line 2
@INC =
/home/www/mydomian.com/cgi-bin/gallery/admin
/usr/local/lib/perl/5.6.1
/usr/local/share/perl/5.6.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.6.1
/usr/share/perl/5.6.1
/usr/local/lib/site_perl
.
CGI INPUT
======================================
ID => 10
d => 1
CGI Cookies
======================================
editor_cols => 100
editor_rows => 20
s => 56ec0fa1202b9c709c540b97685e143c
ENVIRONMENT
======================================
DOCUMENT_ROOT => /home/www/mydomian.com/
GATEWAY_INTERFACE => CGI/1.1
GT_TMPDIR => /home/www/mydomian.com/cgi-bin/gallery/admin/tmp
HTTP_ACCEPT => */*
HTTP_ACCEPT_ENCODING => gzip, deflate
HTTP_ACCEPT_LANGUAGE => en-gb
HTTP_CONNECTION => Keep-Alive
HTTP_COOKIE => editor_cols=100; editor_rows=20; s=56ec0fa1202b9c709c540b97685e143c
HTTP_HOST => www.mydomian.com
HTTP_REFERER => http://www.mydomian.com/...n/gallery/review.cgi
HTTP_USER_AGENT =>
PATH => /usr/local/bin:/usr/bin:/bin
QUERY_STRING => ID=10&d=1
REMOTE_ADDR => 217.158.195.119
REMOTE_PORT => 3292
REQUEST_METHOD => GET
REQUEST_URI => /cgi-bin/gallery/review.cgi?ID=10&d=1
SCRIPT_FILENAME => /home/www/mydomian.com/cgi-bin/gallery/review.cgi
SCRIPT_NAME => /cgi-bin/gallery/review.cgi
SERVER_ADDR => 66.118.167.3
SERVER_ADMIN => --
SERVER_NAME => mydomian.com
SERVER_PORT => 80
SERVER_PROTOCOL => HTTP/1.1
SERVER_SOFTWARE => Apache/1.3.22 (Unix) AuthMySQL/2.20 PHP/4.2.3
I've reverted all templates to originals and the reviews exist with the correct information.
The sql that its trying to run with the input (ID => 10 d => 1) works fine as a stand alone sql statement. 'SELECT * FROM lsql_gallery_Reviews WHERE ( Review_LinkID = 10 AND Review_Validated = 1 )
So im guessing in my fiddling I've could a bug.
Adding reviews works fine. but viewing any review with any user results in the above error.
Help please Cat xx
<%if Review_Count%>
a href="<%db_cgi_url%>/review.cgi?ID=<%ID%>">Read <%Review_Count%>Comment(s)</a>
<%endif%>
Error:
Quote:
A fatal error has occured:
Can't call method "fetchrow_hashref" on an undefined value at /home/www/mydomian.com/cgi-bin/gallery/admin/Links/User/Review.pm line 114.
Please enable debugging in setup for more details.
Stack Trace
======================================
Links (26208): Links::environment called at /home/www/mydomian.com/cgi-bin/gallery/admin/Links.pm line 431 with no arguments.
Links (26208): Links::fatal called at /home/www/mydomian.com/cgi-bin/gallery/admin/Links/User/Review.pm line 114 with arguments
(Can't call method "fetchrow_hashref" on an undefined value at /home/www/mydomian.com/cgi-bin/gallery/admin/Links/User/Review.pm line 114.
).
Links (26208): Links::User::Review::review_search_results called at /home/www/mydomian.com/cgi-bin/gallery/admin/GT/Plugins.pm line 108 with no arguments.
Links (26208): GT::Plugins::dispatch called at /home/www/mydomian.com/cgi-bin/gallery/admin/Links/User/Review.pm line 32 with arguments
(GT::Plugins, /home/www/mydomian.com/cgi-bin/gallery/admin/Plugins, review_search, CODE(0x825305c)).
Links (26208): Links::User::Review::handle called at /home/www/mydomian.com/cgi-bin/gallery/admin/GT/Plugins.pm line 108 with no arguments.
Links (26208): GT::Plugins::dispatch called at review.cgi line 25 with arguments
(GT::Plugins, /home/www/mydomian.com/cgi-bin/gallery/admin/Plugins, handle_review, CODE(0x822fda4)).
System Information
======================================
Perl Version: 5.006001
Links SQL Version: 2.1.2
DBI.pm Version: 1.21
Persistant Env: mod_perl (0) SpeedyCGI (0)
GT::SQL::error = Failed to execute query: 'SELECT * FROM lsql_gallery_Reviews WHERE ( Review_LinkID = ? AND Review_Validated = ? )
ORDER BY Custom column desc
LIMIT 0, 5' Reason: You have an error in your SQL syntax near 'column desc
LIMIT 0, 5' at line 2
@INC =
/home/www/mydomian.com/cgi-bin/gallery/admin
/usr/local/lib/perl/5.6.1
/usr/local/share/perl/5.6.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.6.1
/usr/share/perl/5.6.1
/usr/local/lib/site_perl
.
CGI INPUT
======================================
ID => 10
d => 1
CGI Cookies
======================================
editor_cols => 100
editor_rows => 20
s => 56ec0fa1202b9c709c540b97685e143c
ENVIRONMENT
======================================
DOCUMENT_ROOT => /home/www/mydomian.com/
GATEWAY_INTERFACE => CGI/1.1
GT_TMPDIR => /home/www/mydomian.com/cgi-bin/gallery/admin/tmp
HTTP_ACCEPT => */*
HTTP_ACCEPT_ENCODING => gzip, deflate
HTTP_ACCEPT_LANGUAGE => en-gb
HTTP_CONNECTION => Keep-Alive
HTTP_COOKIE => editor_cols=100; editor_rows=20; s=56ec0fa1202b9c709c540b97685e143c
HTTP_HOST => www.mydomian.com
HTTP_REFERER => http://www.mydomian.com/...n/gallery/review.cgi
HTTP_USER_AGENT =>
PATH => /usr/local/bin:/usr/bin:/bin
QUERY_STRING => ID=10&d=1
REMOTE_ADDR => 217.158.195.119
REMOTE_PORT => 3292
REQUEST_METHOD => GET
REQUEST_URI => /cgi-bin/gallery/review.cgi?ID=10&d=1
SCRIPT_FILENAME => /home/www/mydomian.com/cgi-bin/gallery/review.cgi
SCRIPT_NAME => /cgi-bin/gallery/review.cgi
SERVER_ADDR => 66.118.167.3
SERVER_ADMIN => --
SERVER_NAME => mydomian.com
SERVER_PORT => 80
SERVER_PROTOCOL => HTTP/1.1
SERVER_SOFTWARE => Apache/1.3.22 (Unix) AuthMySQL/2.20 PHP/4.2.3
I've reverted all templates to originals and the reviews exist with the correct information.
The sql that its trying to run with the input (ID => 10 d => 1) works fine as a stand alone sql statement. 'SELECT * FROM lsql_gallery_Reviews WHERE ( Review_LinkID = 10 AND Review_Validated = 1 )
So im guessing in my fiddling I've could a bug.
Adding reviews works fine. but viewing any review with any user results in the above error.
Help please Cat xx