Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

rate.cgi not updating database

Quote Reply
rate.cgi not updating database
Hi,

I decided to use the rating feature, but just found that the database is not being updated (votes and rating still zero).

Do I have to do something to enable ratings?

Quote Reply
Re: rate.cgi not updating database In reply to
Did you re-build your directory???

Regards,

Eliot Lee
Quote Reply
Re: rate.cgi not updating database In reply to
Yes... Even if I check links via de admin menu, they are still zero

Quote Reply
Re: rate.cgi not updating database In reply to
ANy idea??

Quote Reply
Re: rate.cgi not updating database In reply to
If you are not seeing any errors, run the program, then check your error log and see if any errors are printed there.

You might want to look at the SQL.mysql file and verify that the rates tables are set up properly in your database. Just check the table names and fields against what is in that file.

Quote Reply
Re: rate.cgi not updating database In reply to
No errors in the log files.

What I notice is that the "you just voted for this link" routine does work... could this give any direction?

Wheres the SQL.mysql file?

Quote Reply
Re: rate.cgi not updating database In reply to
I'm assuming you mean you try to enter the vote twice, you don't see the vote, but you get this vote has already been recorded?

If that's true, try dropping and re-creating your build_update table. That's where the hits and votes are stored between builds.

The Rate_Track table seems to be working if you can't vote twice.



Quote Reply
Re: rate.cgi not updating database In reply to
I'm not sure if this is exactly the same as what my database is doing, but it sort of appears related. I've noticed that the Rate_Track table does not appear to be clearing out ratings for a while now, so I went in and looked at it. Sure enough, it looks to be holding everything in the table going back to when the program was installed in February!

I assume 20000225051744 refers to February 25, 2000, with some time stamp? I have several thousand dates going from February up through today, following that pattern, in logical order.

Looking at rate.cgi and jump.cgi, I'm curious why they are set up differently to clear out old items from their particular tables.

rate.cgi:


# Remove old rate tracks.
my $delete_by = $db->get_date (time() - 172800); # 2 days old.
$db->do ("DELETE FROM Rate_Track WHERE created < $delete_by");


jump.cgi:


# Remove old hit tracks.
$db->do ("DELETE FROM Hits_Track WHERE TO_DAYS(NOW()) - TO_DAYS(created) > 2");


My Hits_Track table appears to be working fine, and Rate_Track obviously is not... The Rate function itself is working fine. I tried switching rate.cgi's "drop" function to the jump.cgi format above. The Rate function still works fine, but it is not emptying the table.

I figure I can manually empty the table, but it would be nice to have the stuff in there to figure out what's going on and test the solution. A one time glitch that needs to be cleared out, maybe?

Thanks,
Dan

Quote Reply
Re: rate.cgi not updating database In reply to
Yes, Dan...I have observed this glitch as well...I am in the process of adapting codes from the DELETE FROM HITS_TRACK codes to see if that clears up the problem. If you find an easier solution, please share it if you are willing.

Thanks.

Regards,

Eliot Lee

Quote Reply
Re: rate.cgi not updating database In reply to
Good to know it's not just me at least... I emptied the Rate_Track table today. We'll see if they drop off when they're supposed to, or if they accumulate again like last time. I suppose I could change the 2 day cutoff to speed up the process...

Alex, is this something being/been addressed for the new version?

I wonder how many users have been perplexed by not being able to vote for their site repeatedly? Wink It's not too often you test that side of things on your own directory...

Dan

Quote Reply
Re: rate.cgi not updating database In reply to
In Reply To:
I wonder how many users have been perplexed by not being able to vote for their site repeatedly? It's not too often you test that side of things on your own directory...
Actually...I had a group of beta testers submit links, modify links, delete links, rate links, review links, etc. before re-releasing my site...and I noticed this glitch awhile back...but I have been addressing other issues...and now I am getting around to making the codes more efficient and also working on maintaining the integrity of tables within my database. Wink

Regards,

Eliot Lee