Loading...
 
Features / Usability

Features / Usability


Is there a maximum number of categories?

posts: 18

I’m encountering a problem that suggests to me that I might have reached an upper limit on the number of categories, so I wanted to see whether there is any known such upper limit.

Before my problem arises, I estimate I have about 2150 categories. Somewhere during the subsequent addition of 135 categories, my problem arises. When I delete all the recently added categories, the problem disappears.

The problem: When I create a new wiki article, assign it a category, and save it, the article’s text is saved, but the article shows no sign of having any category (either via the category breadcrumbs or by browsing the category). Similarly, once this problem erupts, if I edit the categories on any earlier-existing wiki articles, all the categories from that article disappear in the same sense.

I had been running a far-out-of-date Tiki 15.5 when this first arose. I reverted to a backup of the database saved before the problem arose. (I didn't realize then that I could simply delete the new categories.) I then migrated to Tiki 24.2, hoping that all would be well. Initially all was fine until I once again tried to add a bunch of categories, then the problem recurred.

I don't think it's a problem with the particular categories I added, because the original set of additional categories that triggered the problem originally is not identical to the set of additional categories that trigger the problem tonight.

Thanks in advance for any insight!
Jim

posts: 8633 Israel

Hello,

In my opinion with such numbers you should use something else than categories. ;-)

2 things;

  1. To see changes it is advised to rebuilt your unified index.
  2. I understand you add "a bunch" of categories and it sound like you imported them.

I had issue with the "name" of imported things. By that I mean that you may have invalid category name or parameters added during the import as they would have been rejected should you have added them "manually". See: https://dev.tiki.org/item8198... may be ?

Good luck

posts: 18
Bernard Sfez / Tiki Specialist wrote:

Hello,
In my opinion with such numbers you should use something else than categories. ;-)

2 things;

  1. To see changes it is advised to rebuilt your unified index.
  2. I understand you add "a bunch" of categories and it sound like you imported them.

I had issue with the "name" of imported things. By that I mean that you may have invalid category name or parameters added during the import as they would have been rejected should you have added them "manually". See: https://dev.tiki.org/item8198... may be ?

Good luck

Thanks! I took your advice and rebuilt my unified index. (It hadn't been done since 2017!)

I did other things, too. (See my reply to the next answer.) So I can't reliably attribute effects to particular thing(s), but my problem at least for now is solved.

Thanks, again, for your suggestions.


posts: 126886 United Kingdom

There's no fixed limit i'm aware of, i have one site with about 1,500 - ah, right, the categories are ok but you can't save a page with that many, so i think it's an issue with the number of inputs in the wiki edit form, and there's a php.ini setting max_input_vars which i think defaults to 1000, but you need two for each category - so try setting this to a huge number (try 5000 or 6000) and restart your web server.

Hope that helps?

posts: 18
Jonny Bradley wrote:

There's no fixed limit i'm aware of, i have one site with about 1,500 - ah, right, the categories are ok but you can't save a page with that many, so i think it's an issue with the number of inputs in the wiki edit form, and there's a php.ini setting max_input_vars which i think defaults to 1000, but you need two for each category - so try setting this to a huge number (try 5000 or 6000) and restart your web server.

Hope that helps?

Thanks! I took your advice to increase max_input_vars to 5000. However, I’m not sure why that particular parameter should matter in my case. (I think you were thinking that I might include a large number of categories on a single wiki page; but I use at most a couple of handfuls on any particular page.)

I also bumped up the memory/script (memory_limit), to unlimited.

In any case, after those changes (and rebuilding the unified index, per prior suggestion), I was able to batch-add 100+ categories with no problem. (I could edit categories on wiki pages, and they'd reflect the changes.)

So, I’m cautiously back in business. Thanks, much, for your suggestion!


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting