Gossamer Forum
Quote Reply
Review.pm error/bug
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:

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 xxCrazy
Quote Reply
Re: [catlovette] Review.pm error/bug In reply to
The error, as the debugging specifies is with "Custom column desc"

Is this not related to any code you've added?

That text doesn't appear anywhere in Review.pm

Last edited by:

Paul: Feb 24, 2003, 8:44 AM
Quote Reply
Re: [Paul] Review.pm error/bug In reply to
Sorry i didnt see the 'Custom column desc' in the error.

Although I have not added any extra code to Review.pm or any other file baring templates.

The review table has no extra fields/columns than default. I've not started to make any changes yet to the reviews area. Here are the columns

Quote:
1 ReviewID INT Yes Review ID TEXT
2 Review_LinkID INT Yes Review Link ID TEXT ^\d+$
3 Review_Owner CHAR(50) Yes Review Owner TEXT
4 Review_Rating SMALLINT Yes Review Rating TEXT ^\d+$
5 Review_Date DATE Yes Review Date DATE
6 Review_Subject CHAR(100) Yes Review Subject TEXT
7 Review_Contents TEXT Yes Review Contents TEXTAREA
8 Review_ByLine CHAR(50) No Review By Line TEXT
9 Review_WasHelpful INT No Review Was Helpful TEXT ^\d+$
10 Review_WasNotHelpful INT No Review Was Not Helpful TEXT ^\d+$
11 Review_Validated ENUM(No, Yes) Yes No Review Validated SELECT
12 Review_GuestName CHAR(75) No Review Guest Name TEXT
13 Review_GuestEmail CHAR(75) No Review Guest Email TEXT ^(?:(?:.+\@.+\..+)|\s*)$


I have no idea where "Custom column desc" is coming from! The string used is;
mydomain.com/cgi-bin/gallery/review.cgi?ID=10&d=1

??Crazy
Quote Reply
Re: [catlovette] Review.pm error/bug In reply to
You installed any plugins?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Review.pm error/bug In reply to
yes only SearchFilter but im not using it.

I have installed and uninstalled ClaimLink and Auth_Community as i installed them to test them.

Reviews were working yesterday. The only thing i remember doing that my have some relevance is change the review_add template to remove %Review_ByLine% but then changed it back to default.

Cat
Quote Reply
Re: [catlovette] Review.pm error/bug In reply to
Hi,

This is a bug in Links SQL. If you go to Setup->Review options and look at the sort options for reviews, the last option:

<option> Custom column</option>

should not be there. Just change it to one of the first three and things will work fine.

Cheers,

Alex
--
Gossamer Threads Inc.