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

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

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:
Trump vows Iran will be 'living in Hell' by Tuesday if Strait of Hormuz deadline missed
The PWHL is growing and post-Olympics boom may take women's hockey to the next level
CNBC Points Pro: How soon should I use my credit card points after earning them?
USDA Secretary Brooke Rollins sent Easter email to staff touting 'Jesus' and 'God'
Trump praises Hungary PM Viktor Orbán after Vance calls him at Budapest rally
Google CEO Sundar Pichai says 'AI shift' opens opportunities to invest in startups
Delta, Southwest raise checked bag fees $10 amid jet fuel price surge, joining other carriers
Book: There is No Antimemetics Division
JD Vance calls Iran ceasefire a 'fragile truce' and says Trump is 'impatient to make progress'
Markets shift back towards potential Fed rate cut this year with Iran ceasefire in place