Gossamer Forum
Home : Products : Gossamer Links : Discussions :

One Entry Too Many

Quote Reply
One Entry Too Many
The grand total count on my script is showing 1070 but there are only 1069 entries (1069 is the last ID# used and there are no empties). This happened earlier tonight and I did a rebuild of the tables to correct it, it worked perfectly - finding an incorrect count in one of my categories.

Since then I have added a few new entries and the error count is back. I tried the rebuild again but to no avail.

A little help!?

--

Kriis
Quote Reply
Re: [kriis] One Entry Too Many In reply to
Hi,

Hmm, very strange. To fix, you could probably do:

http://domain.com/...o=repair&force=1

which will force a recalculation of number of links. Doesn't explain why the counts are going off in the first place, but I'll look into it.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] One Entry Too Many In reply to
Alex, I had similar problem, and I found the origin of the problem..

The problem is, that the Repair function is recalculating only, if the root category Computers with 83 links, stored in category table is not equal with all links under that category & subcategories.

Situation 1:
Computers (83), Computers/Accessories (73), Computers/Printers (10)

Situation 2:
Computers (83), Computers/Accessories (72), Computers/Printers (11)

So in Situation 2 we added one link to Printers, and deleted one from Accessories, right? The number of root category Computers was not changed.
Therefore the Repair feels that everything is fine, so no Repair is needed (repair function will be not executed).

Workaround: add/delete a link from the category with wrong count number.

Alex, although this bug appears very rarely, but should be corrected sometime. I understand that it is a performance optimization, but as you see sometimes can cause problems. I'm open to discuss about a solution to avoid that problem.

Kriis, I hope, that was the problem, and will cound correctly after doing the workaround.
P.S.: Kriis, nice cat :-)

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: Sep 21, 2002, 1:20 AM
Quote Reply
Re: [webmaster33] One Entry Too Many In reply to
Thanks webmaster33 that does sound like it will turn out to be the problem but with 1069 links it will take me forever to figure out where the problem is. At least I now know where to look or maybe I will delete a link in every category just to be safe! Wink

P.S. Thanks for the compliment, I was going for unbearably cute with the kitten. Think I hit the mark? Laugh

--

Kriis
Quote Reply
Re: [kriis] One Entry Too Many In reply to
No. You only have to look for category where the link number is invalid.

And you can do this by using the dynamic mode, and going to a subcategory page where the category link count is displayed. You can find it easily this way.

You better add link, instead of deleteWink. Then later you can delete that dummy link.

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...
Quote Reply
Re: [webmaster33] One Entry Too Many In reply to
Quote:
The problem is, that the Repair function is recalculating only, if the root category Computers with 83 links, stored in category table is not equal with all links under that category & subcategories.


Yes, I know. Normally repair only looks at the root categories, and repairs the count if the root category count == number of links in it's category and all subcategories. The problem happens if a subcategory count is off. However, if you add on force=1 as shown in the URL above, it will recalculate root category and all subcategories, regardless. You do not need to add/delete from other categories.

The issue is how did the count get off in the first place. All adds + deletes done through the admin or user side should update the category counts automatically. I'm trying to track down the sequence of steps that will lead a category to have the wrong count.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] One Entry Too Many In reply to
Great! Thanks! Hmm, I missed the force option Tongue
In my case the problem was touching the database manually. Angelic

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...