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

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

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's AI executive order nears key deadline as regulation debate intensifies
Iran's overlapping power centers make ending the war more complicated
Pirro moves to drop case against Olympian, says Reflecting Pool damage caused by 'flawed installation'
As Warsh’s Fed faces pressure to act on inflation, these indicators show it’s at its lowest in years
Mask on a stick?
Star Trek: Strange New Worlds: The Griffin Incident
Movie: An Elephant Sitting Still
Looking at just the odds isn’t enough. How traders gain an edge on prediction markets
Buying a condo with a mortgage may soon get more complicated. Here's why
EV prices aren't following the 'law of used cars,' analyst says — what it means for buyers and sellers