Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Crazy 2.0.4 question - need some old timers advice.....

Quote Reply
Crazy 2.0.4 question - need some old timers advice.....
Hey guys...

It's been along time since I've been to visit... Links SQL 2.0.4 has been serving us well... As an e-commerce platform of all things. Go figure.

I'm hoping someone thats been in this for the long haul can offer up some quick advice, maybe something like this has happened in the past and I can be pointed in the right direction....

Anyways we've recently had an SQL server issue that fowled up our Links.db (or Products.db in our case). We did a restore of the corrupted database from a backup... and everything seems fine... Except when using the admin browser. Our category tree shows up fine, we're able to browse the tree... but no links (products) show up in any of the categories or sub-categories.

The CatLinks table looks fine, and appears to be properly populated... I never really dove that hard into the browser part of the admin and really don't know what else might make nothing appear in the browser tree.... If I go to the editor, and LIST ALL, it lists all of the links (products), and the proper categories for each after each record...

Unfortunately the store templates were all written hard coded... Dynamic mode unfriendly.... so I can't tell if that portion of the software is picking up the links (products).

We use browser to edit our items regularly... and I'm pretty concerned about doing a rebuild... I really don't want to see our store vanish if the nph-build routine doesn't pick up the links (products) either.

I tried adding a link (product) to see where it would show up in the tree... but it doesn't seem to be functioning properly... Now we don't do that alot and I don't remember if there were issues with that functionality before this issue started... or not...

Any advice where to look progmatically or if there is anything in particular that is known that can cause this issue, please throw out your best guesses... I need this resolved....

Thanks in advance....

AlexJ

Last edited by:

AlexJ: Mar 23, 2009, 9:30 PM
Quote Reply
Re: [AlexJ] Crazy 2.0.4 question - need some old timers advice..... In reply to
You're confusing me ;)

You speak of LinksSQL, but then you talk about Links.db (which is something from Links2, static file)

Are you just refering to the TABLE name?

If you wanna shoot over your admin panel details, I don't mind having a quick look for you (as long as you reply before I go on my vacation on wednesday night ;))

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] Crazy 2.0.4 question - need some old timers advice..... In reply to
Andy...!

I was hoping you or one of the other guys I became so familiar with back in 2001ish would still be around... I don't really see any recent posts from the others (Pugdog/Elliot..etc).. Any of them still around?

My bad... I haven't dug into links in so long...

Yes I was referring to the table name(s).

Thanks for the offer... I'll shoot you over some details....

AlexJ
Quote Reply
Re: [AlexJ] Crazy 2.0.4 question - need some old timers advice..... In reply to
Hi,

Afraid I'm the only one who's still active =)

Quote:
Yes I was referring to the table name(s).

Thanks for the offer... I'll shoot you over some details....

Ok cool, and NP.

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] Crazy 2.0.4 question - need some old timers advice..... In reply to
Bummer... That was kind of a fun time... with everyone plugging away at the code. I'm sure others have taken over where those guys left off...

So here is the latest update. I've been focusing on the issue of it not wanting to run the repair tables function. Through alot of debugging I discovered these specific problems....

When checking the category stats... in the nph-build.cgi routine _reset_category_stats, it compares the actual number of links it finds in the CatLinks table for each category, vs the number in the Category table field "Number_of_Links".

Here is the GT Module call:
Quote:
my $total = $cat_link->count ( GT::SQL::Condition->new (['CategoryID', 'IN', \$str], ['isValidated', '=', 'Yes']));

and this is what the SQL query should look like:

Quote:

SELECT COUNT(*)
FROM CatLinks, Products
WHERE CatLinks.LinkID = Products.ID
AND (CategoryID IN (128) AND isValidated = 'Yes')

but this is what we're getting:

Quote:

SELECT COUNT(*)
FROM CatLinks, Products
WHERE
AND (CategoryID IN (128) AND isValidated = 'Yes')

Any thoughts on what might be causing the GT module to be writing bad querys like that?

Best regards,

AlexJ
Quote Reply
Re: [AlexJ] Crazy 2.0.4 question - need some old timers advice..... In reply to
Looks like it's not joining the tables properly. Check your def files to make sure the fk and fk_tables keys contain the proper data. 'Products' isn't a standard table, so it looks like you've made some customisations.

Adrian
Quote Reply
Re: [brewt] Crazy 2.0.4 question - need some old timers advice..... In reply to
Whoa! Adrian!

I owe you... big time. If your ever in the Tampa, FL area... I owe you a beer... and I'll hook up Andy too for trying...

It looks like somewhere in our restore of the corrupted database... somehow someone messed up the fk key in the CatLinks.def file.

A quick edit to the correct database name and bam... It's magicially back to life.

A world of thanks!

AlexJ

Smile