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

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

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:
Asia’s rich fear losing the family fortune — but many still have no succession plans, survey shows
This is the greatest time ever for semiconductors, says CEO of key equipment supplier
The Terror: The Devil in Silver: A Number in the System
South Korea's Kospi, Japan's Topix hit record highs as investors shrug off Iran tensions
Oaxaca bound
Is there a (cheaper) hack for this biofeedback thing?
Okta jumps 8%, tops first-quarter results on agentic AI demand
Blue Origin rocket explodes on launchpad during ground test
Movie: Over Your Dead Body
Movie: Hour of the Wolf