| ||||||||||||
![]() |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
(#1)
|
| New Member Posts: 11 Join Date: Oct 2005 | Knowledgebase - number of articles count -
23-11-2005, 11:54 PM
When you look at the categories within the knowledgebase, it shows the number of articles in that category next to the Category Title. Problem is that it doesn't actually show the TOTAL number of articles under that category if there are subcategories. I will give you an example. Parent Category: Web Hosting (0) - shows zero articles ---Sub-Category: FTP (5) - has 5 articles directly under FTP ---Sub-Category: E-Mail (20) - has 20 articles directly under ---Sub-Category: Control Panels (0) - shows zero articles, but there are sub-sub categories. ------Sub-Sub-Category: cPanel (15) ------Sub-Sub-Category: Helm (10) So looking at the example above, the Top Parent Category should show as (50) articles ... but it shows as (0), Customers therefore think there is nothing in there. This also goes for the Control Panels category which has sub-categories. How do we get the Parent Categories to show the TOTAL number or articles under it including all sub categories ... this is a very annoying problem. ![]() █ www.swishconnect.com.au █ Web Hosting | Domain Names | Web Development | e-Commerce | • $39 .com.au/.net.au domains |
| | |
(#2)
|
(#3)
|
| New Member Posts: 11 Join Date: Oct 2005 |
24-11-2005, 07:15 AM
I just wonder if this is a bug or just poorly thought out. █ www.swishconnect.com.au █ Web Hosting | Domain Names | Web Development | e-Commerce | • $39 .com.au/.net.au domains |
| | |
(#4)
|
(#5)
|
| Member Posts: 39 Join Date: Oct 2005 Location: Cardiff, UK |
24-11-2005, 10:57 PM
I have submitted a bit (with a patch) which corrects this (http://bugs.kayako.net/index.php?do=details&id=1007). Using the second patch, it not only counts just public (no draft or private) articles, it also counts ALL subcategories, and even better - it only counts unique articles, so if you have an article in two different (sub) child categories of a parent category it will only be counted once. I have is running on the test-version of my site which is due to go live in the next few days or so. Seams to be working fine. UK Hosting and Reseller Hosting from JAB Web Solutions |
| | |
(#6)
|
(#7)
|
| New Member Posts: 11 Join Date: Oct 2005 |
25-11-2005, 07:35 AM
does Varun know about this ... is there a plan to fix it? █ www.swishconnect.com.au █ Web Hosting | Domain Names | Web Development | e-Commerce | • $39 .com.au/.net.au domains |
| | |
(#8)
|
| Member Posts: 39 Join Date: Oct 2005 Location: Cardiff, UK |
25-11-2005, 09:18 AM
Must admit, I haven't thought about the Download section - we only have a very simple one at the moment. I'll look into 'porting' the changes to the Download section as well and see what I can come up with. Should have something in the next day-or-so. UK Hosting and Reseller Hosting from JAB Web Solutions |
| | |
(#9)
|
| New Member Posts: 18 Join Date: Sep 2005 |
25-11-2005, 07:48 PM
Download section has the exact problem. I asked a while back and somebody suggested removing the tag but it is not the answer. Submitted a ticket and I was told it should be fixed in 3.0.26 so I dared to run the cvs and still no go. Even kayako’s own site has the problem. Check http://support.kayako.net/index.php?...nloads&_a=view |
| | |
(#10)
|
| Member Posts: 39 Join Date: Oct 2005 Location: Cardiff, UK |
25-11-2005, 08:36 PM
Actually, the initial problem (if it's the same as the Knowledgebase section) is that the recursive section of the code isn't being totalled correctly. The code goes: count 0 // i.e. start from the root category with count being (sorry about the bad formatting): count cat { number = articles in cat foreach subcat under cat { total = number + count subcat } database set cat to total return total } The problem is that it will only add the last-searched subcategory to the number of articles in the current section (subcategories searchs in descending sort order). It should be: count cat { total = articles in cat foreach subcat under cat { total += count subcat } database set cat to total return total } to make sure all sub categories are added. What I've done with the KB code is count cat { array = [] foreach subcat under cat { subarray = count subcat foreach id in subarray { add id to array if id not in array } } list = [list of article id's in cat] foreach id in list { add id to array if id not in array } database set cat to length of list return array } This way the code goes deep-first and only adds articles to the array if it they don't exist - no matter where the article exists below the sub category, it will not be added again if it's in another sub-category below that being counted. I'll try and sort out a patch for the download section now. UK Hosting and Reseller Hosting from JAB Web Solutions |
| | |
(#11)
|
| Member Posts: 39 Join Date: Oct 2005 Location: Cardiff, UK |
25-11-2005, 11:26 PM
OK. I've finished the update and attached the two patches - one for the knowledgebase system and the other for the download section. In the end, the download section doesn't need to be as complete - after all, a download can only exist in one section and a section can only have one parent, so there's no need to do the track for unique downloads. I've also updated the knowledgebase section aswell - there were a few mistakes in the original which I've corrected. I've tested both updates on my test server (copy of the website on our internal lan) and they're now live on the main website. I'll add both of these patches to Flyspray now aswell. Hopefully they'll be included soon. UK Hosting and Reseller Hosting from JAB Web Solutions |
| | |
(#12)
|
(#13)
|
| Member Posts: 39 Join Date: Oct 2005 Location: Cardiff, UK |
26-11-2005, 12:32 AM
Absolutley no idea - that's upto Kayako. All I've done is fix the issue for my own site. I had originally attached them to Flyspray, but as a few people have noticed/complained about the why SupportSuite counts I'm offering them for those that would like them. At the end of the day, if you don't know what you're doing, it's not a good idea to be playing around with them and it upto the staff here to decide if they should be included. BTW, these are patches against the 3.00.26 CVS (14th November), although they'll probably work with most recent released (untested!!). UK Hosting and Reseller Hosting from JAB Web Solutions |
| | |
(#14)
|
(#15)
|
| Member Posts: 39 Join Date: Oct 2005 Location: Cardiff, UK |
26-11-2005, 12:37 AM
Flyspray is the bug-tracking software kayako uses (http://bugs.kayako.net/index.php) the bug in question is http://bugs.kayako.net/index.php?do=details&id=1007 As for the patches, if you really want to know (BTW, this is for *nix systems - I don't know if the patch system is available in Windows): cd /path/to/supportsuite patch -p1 --dry-run -i /path/to/patch If there are no problems, you can remove --dry-run and the changes will be made to the file. UK Hosting and Reseller Hosting from JAB Web Solutions |
| | |
![]() |
| Tags |
| articles, count, knowledgebase, number |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I list more than 3 Popular Knowledgebase Articles? | MoleEnd | How do I? | 3 | 12-05-2007 08:58 AM |
| All template groups' knowledgebase articles included in IRS - problem | steveparks | SupportSuite, eSupport and LiveResponse | 16 | 25-10-2006 02:41 AM |
| change the size number count in knowledgebase | disenioweb | Developers & Code | 5 | 15-09-2006 12:44 PM |