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

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

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:
[New Premium Theme] Qlassy Theme with complete features - Beta Version
RCI Hospitality strip club execs bribed tax auditor with comped dances: NY AG
Images of Trump and Jeffrey Epstein projected on Windsor Castle as U.S. president visits the UK
China's Baidu soars 16% to hit 2-year highs amid positive signs for its AI business
Microsoft, Nvidia, other tech giants plan over $40 billion of new AI investments in UK
Fed set to cut rates, but forecast for rest of 2025 is key to markets with politics clouding the picture
Josh Harris says you likely won't see more sports assets going public as values soar
Fund manager reveals the rule that made him a 2,000% return on one stock
The UK's top fintech companies: 2025
UK's GSK announces $30 billion U.S. pharma investment amid Trump state visit