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

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

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:
What obesity drugmakers see next in the market: More pills, easier access and drug combinations
Airlines cancel hundreds of flights as massive winter storm sweeps across U.S.
Shares of CSG, one of the world’s fastest-growing defense firms, jump 31% on debut
What I want from Apple, Meta and Microsoft in their key earnings reports
Trump administration to take 10% stake in USA Rare Earth in $1.6 billion deal, sources say
Energy stocks to watch as major winter storm rips through the U.S.
Earnings playbook: Apple and Caterpillar lead a big week of reports
China didn’t grab many headlines at Davos, but it's the elephant in the room
Another day another high: Gold surges past $5,000 as investors seek shelter from global risks
Stock futures fall as traders get set for a big week of trading: Live updates