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

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

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:
Here are the 3 big things we're watching in the stock market in the week ahead
'Silent killers': How AI start-ups are trying to solve one of the retail industry's biggest problems
Sánchez to Trump: Spain won’t ‘applaud those who set the world on fire just because they then show up with a bucket’
Homebuyer mortgage demand drops annually for the first time in over a year, as war fuels uncertainty
ICE agents shoot man in California after he 'weaponized' vehicle, DHS says
Google CEO Sundar Pichai says 'AI shift' opens opportunities to invest in startups
JD Vance calls Iran ceasefire a 'fragile truce' and says Trump is 'impatient to make progress'
Alphabet, Meta, Amazon, Nvidia lead tech rally after Trump announces ceasefire with Iran
Robinhood’s Trump Accounts partnership signals big upside for the stock, analysts say
Delta CEO says airline will 'meaningfully' cut growth plans, sees $300 million boost from its refinery