Gossamer Forum
Home : Products : Links 2.0 : Customization :

Bizarre error w/ AltCategories Mod

Quote Reply
Bizarre error w/ AltCategories Mod
Hey - I feel like a moron for posting this, but I just can't figure out what the heck is going on...

I tried to implement the AltCategories Mod at http://www.online-sweepstakes.com/links-mods/ and I'm pretty sure I followed the instructions correctly - I've checked and double-checked.

Anyway, after making the changes to the various scripts, I manually edited the links.db file to add the new field (empty for each existing record).

So far so good.. I rebuilt the pages, everything is groovy.

However, when using admin.cgi, if I try to Validate, Add, or Modify, it brings up a drop-down category select menu for the ID field. This is something of a problem, of course, since that's a pretty important field. Wink

I have absolutely no idea what this is all about. Has anyone had any experience with something like that happening before? I don't really even know where to look, since I'm not entirely clear on which file brings up those fields in the admin.cgi script (whether it's admin_html.pl or db_utils.pl or what)...

Also, when calculating the number of links in a particular category, for some reason it is now counting every link twice...

Anyway, if anyone has a thought about where I might have gone wrong, I'd love to hear it.

Many thanks in advance for your help.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund

Last edited by:

davidziel: Apr 16, 2002, 1:59 PM
Quote Reply
Re: [davidziel] Bizarre error w/ AltCategories Mod In reply to
You should NOT manually update your database. Three suggestions:

1) Use the upgrade.pl script, which is mentioned and posted in many threads in this forum. Export your file as TAB delimited, then edit all the tab characters (\t) with pipes (|) via a text editor like TextPad or WordPad. Then save the file as a .db file.

2) Use an offline database management program like MS Access or MS Excel.

3) Use the DBMAN Database Manager MOD, which is linked in the Resources section of this site.
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Heckler: Apr 16, 2002, 4:01 PM
Quote Reply
Re: [Heckler] Bizarre error w/ AltCategories Mod In reply to
Thanks - that's a fair comment - but I don't see why manually editing the links.db file would have screwed up the way admin.cgi deals with the ID field. Do you have any idea why that might be happening?

(And just for the record - I have manually edited flatfile DBMan databases on hundreds of occasions before, and never run into any problems. Which is really just to say that I don't think that's what went wrong...)

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund

Last edited by:

davidziel: Apr 16, 2002, 4:05 PM
Quote Reply
Re: [davidziel] Bizarre error w/ AltCategories Mod In reply to
Uh...yea, you have either NOT added a pipe or you added an extra pipe, which is causing your database to be corrupted, and thus not viewable properly in the ADMIN.CGI.

Got it?
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] Bizarre error w/ AltCategories Mod In reply to
Okay - I have now re-edited the original links.db file using the methods you suggested and am still receiving the exact same error.

To offer further evidence that the problem I am experiencing is not stemming from a corrupted db file, it happens when I try to Add a link from the admin page. That feature shouldn't be dependent on the db file at all, should it? Correct me if I'm wrong (and I have no doubt that you will), but I would think the ADD command on the admin page would only reference links.cfg, links.def, db_utils.pl, admin.cgi and admin_html.pl.

I REALLY think something went wrong somewhere in the installation of the AltCategories mod, and I would GREATLY appreciate it if someone has any ideas.

As always, thanks.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [davidziel] Bizarre error w/ AltCategories Mod In reply to
Hi,

Does links.def look ok?....could you attach a copy or link to it.

Do you have many records in links.db?

I've used this mod before and haven't really encountered this problem but I'm sure we can find a solution.
Quote Reply
Re: [Paul] Bizarre error w/ AltCategories Mod In reply to
Hi Paul.

links.def is attached

There are only 7 links in the database, but each record is very long (if that makes any difference). Prior to implementing the mod, everything worked swimmingly. Since implementing the mod, the existing records all still display perfectly. They are just being counted twice when determining the number of links in each category (though still only once when counting the total number of links).

The problem with the category drop-down list appearing for the ID field only seems to happen when using admin.cgi. In other words - I can still add links from the user end (via add.cgi) with no trouble. When I go to validate them, however, whatever had been generated for the ID field gets lost when the drop-down category list steps in. Hopefullly that makes sense...

Thanks for your help.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [davidziel] Bizarre error w/ AltCategories Mod In reply to
Hi,

The first think I notice is you are missing:

$db_alt = 5;

...from links.def
Quote Reply
Re: [Paul] Bizarre error w/ AltCategories Mod In reply to
THANK YOU, PAUL!!

It's always some stupid little thing like that, isn't it? That seems so obvious, and yet I must have missed that step in the mod and then missed it again four more times as I checked my work!

Anyway, that completely solved the problem and everything works perfectly now. I really appreciate your taking the time to help.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [davidziel] Bizarre error w/ AltCategories Mod In reply to
No probs. (I was gonna say "no worries" but a few people started thinking I was Australian Laugh)
Quote Reply
Re: [Paul] Bizarre error w/ AltCategories Mod In reply to
Actually, I spoke too soon. There is still one remaining error, though it is relatively minor. Links are still being counted twice in the category totals and once in the grant total. This only happens when displaying the number of links on pages, though. When the nph_build.cgi script is running on the admin page, it displays the correct number of links per category.

Any thoughts at all on that one? I assume it has to do with nph_build.cgi, but beyond that I'm baffled. Thanks again...

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund

Last edited by:

davidziel: Apr 17, 2002, 5:30 AM
Quote Reply
Re: [davidziel] Bizarre error w/ AltCategories Mod In reply to
All links are being counted twice?...eg if you have a category with 10 links, it would show 20?
Quote Reply
Re: [Paul] Bizarre error w/ AltCategories Mod In reply to
That's correct. But it doesn't happen on the admin page when I run nph_build.cgi, only on the category and home display pages. And the grant total is fine.

Seemingly this happens when it runs sub site_html_print_cat in site_html_templates.pl. I have $numlinks in there, but $numlinks is returning a number twice as high as the actual number of links in the category.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [davidziel] Bizarre error w/ AltCategories Mod In reply to
Is everything else with the alt cat mod definitely installed ok?
Quote Reply
Re: [Paul] Bizarre error w/ AltCategories Mod In reply to
Oops... There must have been a mistake somewhere in the build_stats subroutine in my nph_build.cgi. I don't know exactly what it was, but I did a complete cut and paste (when installing the mod originally, I did it as a line by line edit, only where something seemed to be different) and now it all works fine. Sorry to have bothered you with that one. Blush

Anyway, thanks again for your help.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund