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

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

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:
2026 will bring more GLP-1 weight loss pills — and new habits. These stocks are poised to benefit
Stellantis resurrects $100,000 Ram TRX V-8 pickup truck amid industry deregulation
Italy says U.S. sharply reduced proposed pasta tariffs after a review
Trump orders Chinese-controlled firm to unwind chip asset deal, citing national security risks
Week in review: We initiated a position — plus, top gainers and laggards of 2025
China’s ‘Silicon Valley’ is building robots and fortune-telling AI apps at the same time
China’s BYD overtakes Tesla as world’s top EV seller for the first time
Anthropic's 'do more with less' bet has kept it at the AI frontier, co-founder Amodei tells CNBC
After a bruising 2025, the Fed faces another slew of challenges in the year ahead
South Korea's Lee begins China state visit after North fires missiles