Gossamer Forum
Home : Products : Gossamer Links : Discussions :

SubCategory Counts

Quote Reply
SubCategory Counts
We have a reproducible problem with category counts. For example, we have the following structure:

Home page: Main Categories: Subcategories Under Main Categories: Subcategories Under Subcategories

For example's sake, let's say we are talking about:

Home Page: Printers: Epson: Stylus Pro 5000

which currently has 1 link.

A user submits a link to the above category. Validation is on so the admin must validate the link before it is added to our database.

Let's further assume that the link is actually to the Stylus Pro 5500 so prior to validating the link, the admin creates another category:

Home Page: Printers: Epson: Stylus Pro 5500

After created, when validating the link, the admin changes the category pulldown to 5500.

The category counts we'd expect would be:

Home Page: Printers: Epson: Stylus Pro 5000 (1)
Home Page: Printers: Epson: Stylus Pro 5500 (1)

what we end up with is:

Home Page: Printers: Epson: Stylus Pro 5000 (0)
Home Page: Printers: Epson: Stylus Pro 5500 (2)

It appears that whenever a new category is added, the count takes one away from the category directly above it in the hierarchy and adds it to the new category.

The links themselves are still in the right place, just the counts are off.

If I do a force count on the database, I can repair the problem, but it seems to be a bug since it happens whenever a similar sequence to what has been described is followed.

Is this a known bug?

TIA.
Quote Reply
Re: [Will7] SubCategory Counts In reply to
I think I have had the same problem at some point.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] SubCategory Counts In reply to
I still have this problem...it seems to occur when you move a link from one category to another before or as you are validating it. I just run a repair after I do an update.
Quote Reply
Re: [rayhne] SubCategory Counts In reply to
I think this is a known problem with using the category browser, and running the repair tool sorts it out in most cases.

However when the standard repair doesn't fix the count (checks parent only?) you will need to repair categories from the 'root'. You can do that by adding 'force=1' to the command line, e.g.;

Code:
path_to_your/admin/nph-build.cgi --repair force=1

To be honest I use 'force=1' every time. Hope this helps Smile

All the best
Shaun