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

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

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:
Michael and Susan Dell to donate $750 million to UT Austin to fund new medical campus
Jim Cramer says these stocks show why you need to trade on fundamentals, not fear
Worried about rising gas prices? These 5 credit cards save on transit, rideshare and more
Trump recounts Tim Cook call to 'kiss my ass,' in stark look at White House dealmaking
Oil edges lower after Trump extends ceasefire with Iran
New Apple CEO John Ternus doubted himself when he started: 'I wasn't sure I belonged'
Bike horn for warning oblivious pedestrians
Looking for a good microwave or microwave/air fryer combo
Movie: The Stranger
UK inflation jumps to 3.3% in March as fuel prices surge amid Iran war