Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

LSQL error. Any help appreciated

Quote Reply
LSQL error. Any help appreciated
Hi GT staff, plugin programmers,

I'm developing a plugin right now, and I've faced an error, I was not able to find out what's the problem & correct it. Any idea, what can be the problem?

I would appreciate any help.

Thanks,
Webmaster33

Error descriptions follows:

The error message:
-------------------------
A fatal error has occured:

Can't use string ("Can't use string ("<img src="/spacer.gif" width="1"") as a HASH ref while "strict refs" in use at (eval 10) line 34.")

Please enable debugging in setup for more details.

Stack Trace
======================================
Links (5140): Links::environment called at c:/path/lsql/admin/Links.pm line 429 with no arguments.
Links (5140): Links::fatal called at (eval 10) line 34 with arguments

(

Can't use string (""<img src="/spacer.gif" width="1"") as a HASH ref while "strict refs" in use at (eval 10) line 34.

System Information
======================================
Perl Version: 5.006001
Links SQL Version: 2.1.0
DBI.pm Version: 1.14
Persistant Env: mod_perl (0) SpeedyCGI (0)
@INCLinkID = '21049')

from Links::__ANON__ at (eval 10) line 19
GT::SQL::Driver::MYSQL::sth (5140): Executing query: SELECT Full_Name FROM lsql_Category WHERE ID = 56 from Links::__ANON__ at (eval 10) line 24
GT::SQL::Driver::MYSQL::sth (5140): Executing query: SELECT DirName FROM lsq_Category WHERE ID = 55 from Links::Category::as_url at c:/path/lsql/admin/Links/Category.pm line 456
GT::SQL::Driver::MYSQL::sth (5140): Executing query: SELECT ID FROM lsq_Category WHERE Full_Name = 'Computers/Accessories' from Links::Category::get_id_from_name at c:/path/lsql/admin/Links/Category.pm line 425
GT::SQL::Driver::MYSQL::sth (5140): Executing query: SELECT DirName FROM lsq_Category WHERE ID = 56 from Links::Category::as_url at c:/path/lsql/admin/Links/Category.pm line 456
GT::Plugins (5140): Plugin: pre site_html_link running => Plugins::Extended_Link::site_html_link_pre at c:/path/lsql/admin/GT/Plugins.pm line 91.
GT::SQL::Driver::MYSQL::sth (5140): Executing query: SELECT * FROM lsql_Reviews WHERE Review_Validated = 'Yes' AND ( Review_LinkID = 21049 ) from Links::Link::add_reviews at c:/path/lsql/admin/Links/Link.pm line 381
Can't use string ("CGI INPUT
======================================
d => 1
g => index.html

just ENVIRONMENT follows
--------------------------------------


I've found that this code part causes the error message,
in globals.txt, it is a global named 'lastlink'::
-------------------------
'lastlink' => 'sub {
...
# many code lines are before
$link_hashref = Links::SiteHTML::display("link", $link_hashref);
# I debugged this, and found, only this above causes error
# it calls site_html_link, and should also execute
# the site_html_link_pre PRE hook, too
# many code lines are after
...
}',
-------------------------

I've also a PRE hook, hooked into "site_html_link".
The name of this pre hook is: site_html_link_pre.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: May 13, 2002, 8:46 AM
Quote Reply
Re: [webmaster33] LSQL error. Any help appreciated In reply to
It is impossible to tell without seeing the code but it looks like you are string to use a string as a reference.
Quote Reply
Re: [Paul] LSQL error. Any help appreciated In reply to
Thanks 4 your help, Paul!

I was able to solve the problem myself. I was confused and I did not find the error, because I edited the global.txt itself and not the local copy /local/global.txt Blush
Yep, if I edit something that is not used I will not be able to correct the error. Smile
Sorry for your time.

Thanks,
Webmaster33