Answered: Where is configurations of max length of the categories?

Post date: 2021-04-13 23:51:19
Views: 69

The length of category names is limited by the size of the title field in the respective database table:

MariaDB dbname]> describe qa_categories;
+------------+----------------------+------+-----+---------+----------------+
| Field      | Type                 | Null | Key | Default | Extra          |
+------------+----------------------+------+-----+---------+----------------+
| categoryid | int(10) unsigned     | NO   | PRI | NULL    | auto_increment |
| parentid   | int(10) unsigned     | YES  | MUL | NULL    |                |
| title      | varchar(80)          | NO   |     | NULL    |                |
| tags       | varchar(200)         | NO   |     | NULL    |                |
| content    | varchar(800)         | NO   |     |         |                |
| qcount     | int(10) unsigned     | NO   |     | 0       |                |
| position   | smallint(5) unsigned | NO   |     | NULL    |                |
| backpath   | varchar(804)         | NO   | MUL |         |                |
+------------+----------------------+------+-----+---------+----------------+

The size limit is set when the table is created and the value for the limit is defined in qa-include/db/maxima.php:

$maximaDefaults = array(
  ...
  'QA_DB_MAX_CAT_PAGE_TITLE_LENGTH' => 80,
  ...
};

Please click Here to read the full story.
 
Other Top and Latest Questions:
How to take control of the AI data center boom and built it into your own home in the future
Burger King's president says the chain improved its Whopper — and calls from customers helped
Health insurance question #2
I have more computing power on my desk than 1962 America
The Dark Wizard: The Dark Wizard (2026)
Special Event: Rifftrax Shorts: ANIMALS
With Netflix new ad-free standard plan at $20, streaming's tipping point into old TV is getting closer
Iran says it has sent its response to the U.S. peace proposal
Retailers are on a hiring spree. But consumers are sending warning signs
Bank of America says stocks like Apple have plenty of upside following earnings