Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Returning CODE(0x9e10d20) insttead of variable

Quote Reply
Returning CODE(0x9e10d20) insttead of variable
I have noticed, very occasionally over the last couple of days, errors like this in my log:

File does not exist
: /path/to/my/images/rateCODE(0x9e10d20).gif

Obviosuly, the CODE(XXXX) varies with each report.

I know where this comes from, it is from a global I use to calculate the ratings for the number of stars to show for a given entry. It is the standard global (which I think I have posted elsewhere on this forum). I have used it for years and never seen something like this.

It SHOULD be:

/path/to/my/images/rate05.gif or /path/to/my/images/rate08.gif or whatever, based on the rating of the entry.

I guess something is screwy in the server, but I do not know. Anyone ever seen anything like this before?

dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Returning CODE(0x9e10d20) insttead of variable In reply to
That normally means that its returning a HASH or something... what does the global hold?

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] Returning CODE(0x9e10d20) insttead of variable In reply to
Andy:

Thanks. First I should say it is a very busy site, maybe 500,000 page views (that have this code) a day. I get 20-30 errors a day like this. So it is very sporatic.

Here is the global:

sub {
my ($rec) = @_;
if ($rec->{'Rating'} eq '10.00') {'20'; }
elsif ($rec->{'Rating'} eq '0.00') {'00'; }
elsif ($rec->{'Rating'} eq '') {'00'; }
elsif ($rec->{'Rating'} le '0.75') {'01'; }
elsif ($rec->{'Rating'} le '1.25') {'02'; }
elsif ($rec->{'Rating'} le '1.75') {'03'; }
elsif ($rec->{'Rating'} le '2.25') {'04'; }
elsif ($rec->{'Rating'} le '2.75') {'05'; }
elsif ($rec->{'Rating'} le '3.25') {'06'; }
elsif ($rec->{'Rating'} le '3.75') {'07'; }
elsif ($rec->{'Rating'} le '4.25') {'08'; }
elsif ($rec->{'Rating'} le '4.75') {'09'; }
elsif ($rec->{'Rating'} le '5.25') {'10'; }
elsif ($rec->{'Rating'} le '5.75') {'11'; }
elsif ($rec->{'Rating'} le '6.25') {'12'; }
elsif ($rec->{'Rating'} le '6.75') {'13'; }
elsif ($rec->{'Rating'} le '7.25') {'14'; }
elsif ($rec->{'Rating'} le '7.75') {'15'; }
elsif ($rec->{'Rating'} le '8.25') {'16'; }
elsif ($rec->{'Rating'} le '8.75') {'17'; }
elsif ($rec->{'Rating'} le '9.25') {'18'; }
elsif ($rec->{'Rating'} le '9.75') {'19'; }
elsif ($rec->{'Rating'} le '9.99') {'19'; }
else {'00'; }
}


Obviously, the two-digit number comes back into rateXX.gif (or should!) to givve the correct image.

I realize 20-30 errors a day is not too much, but I am not sure whether this is just normal, and it is OK to ignore, or whether I might have done something!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Returning CODE(0x9e10d20) insttead of variable In reply to
I have had a similar problem recently - for some reason <%Links::Utils::load_link%> suddenly stopped loading globals so I got CODE messages all over the place on my review search results page. Don't know why.
Quote Reply
Re: [carfac] Returning CODE(0x9e10d20) insttead of variable In reply to
Just to confirm - I just had a look at
http://www.bcdb.com/...?g=Display&ID=91
and you seem to have the same problem.

Quick question - have you reinstalled Links recently?

Last edited by:

afinlr: Feb 5, 2004, 9:19 AM
Quote Reply
Re: [carfac] Returning CODE(0x9e10d20) insttead of variable In reply to
I'm a bit confused as to the logic of this global :/

Code:
elsif ($rec->{'Rating'} le '0.75') { '01'; }

... why not;

Code:
elsif ($rec->{'Rating'} le '0.75') { return '01'; }

I would personally use something like;

<%global_name($Rating)%>

... then in the global;

Code:
sub {

my $Rating = $_[0];

if ($Rating eq '10.00') { return '20'; }
elsif ($Rating eq '0.00') { return '00'; }
elsif ($Rating eq '') { return '00'; }
elsif ($Rating le '0.75') { return '01'; }
elsif ($Rating le '1.25') { return '02'; }
elsif ($Rating le '1.75') { return '03'; }
elsif ($Rating le '2.25') { return '04'; }
elsif ($Rating le '2.75') { return '05'; }
elsif ($Rating le '3.25') { return '06'; }
elsif ($Rating le '3.75') { return '07'; }
elsif ($Rating le '4.25') { return '08'; }
elsif ($Rating le '4.75') { return '09'; }
elsif ($Rating le '5.25') { return '10'; }
elsif ($Rating le '5.75') { return '11'; }
elsif ($Rating le '6.25') { return '12'; }
elsif ($Rating le '6.75') { return '13'; }
elsif ($Rating le '7.25') { return '14'; }
elsif ($Rating le '7.75') { return '15'; }
elsif ($Rating le '8.25') { return '16'; }
elsif ($Rating le '8.75') { return '17'; }
elsif ($Rating le '9.25') { return '18'; }
elsif ($Rating le '9.75') { return '19'; }
elsif ($Rating le '9.99') { return '19'; }
else { return '00'; }

}

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: [afinlr] Returning CODE(0x9e10d20) insttead of variable In reply to
afinlr :

Wow- that is UGLY there, a few globals gone kaput (not just the image one)!

I have not reinstalled Links, but I did just upgrade Forum. Come to think of it, that is about when this started. Any possiblility Forum messed up something with Links? They are in mod_perl, so that might have something to do with it.

As that is a dynamic page you pointed out, it is weird that it is reproducable... so it is not a fluke!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Returning CODE(0x9e10d20) insttead of variable In reply to
Did some more checking, it does seem to effect ALL User review pages, but no where else....
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Returning CODE(0x9e10d20) insttead of variable In reply to
Andy:

>>> why not....

Thanks- if that is "cleaner", I will update it. I know JUST ENOUGH perl to get myself in trouble... that is why is is poorly coded (but it had seemed to work...)
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Returning CODE(0x9e10d20) insttead of variable In reply to
OK - I also upgraded forum - are you using mod_perl? (Edit - sorry didn't read your post properly!) I have a feeling it might be to do with loading libraries in the right order. Would be helpful if someone from GT could confirm though.

As far as I can see it is just <%Links::Utils::load_link%> that is the problem.

Edit: It seems that it is the call GT::Template->tags within Utils.pm that is probably the problem. I think this should load the globals but obviously doesn't.

Last edited by:

afinlr: Feb 5, 2004, 9:46 AM
Quote Reply
Re: [afinlr] Returning CODE(0x9e10d20) insttead of variable In reply to
Well, I am sure they will be around soon. Bit early right now for West Coast, but once they get in, they are pretty responsive.
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Returning CODE(0x9e10d20) insttead of variable In reply to
What are the specific versions of Links SQL and Gossamer Forum loaded in the mod_perl server? I'll take at what's changed between the two releases.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Returning CODE(0x9e10d20) insttead of variable In reply to
Hi Jason:

Thanks for looking in!

Latest releases on both- been running Links 2.1.2 for a while, and JUST upgraded Saturday to the new Forum release....

For what it's worth, those globals are ONLY messed up on the Reviews part of my site- those same globals work great on the rest of the site....
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [Jagerman] Returning CODE(0x9e10d20) insttead of variable In reply to
Hi,

Any news on this? Will it be fixed in the next Forum update?

Thanks,
Laura.
Quote Reply
Re: [afinlr] Returning CODE(0x9e10d20) insttead of variable In reply to
Any update on this?

Still having the error!
dave

Big Cartoon DataBase
Big Comic Book DataBase