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

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

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:
SpaceX targets $135 IPO price at valuation of $1.77 trillion
CrowdStrike is a buy, just not yet. Here's why
Eli Manning's private equity firm acquires licensing company for NFL Flag in bet on youth sports
SoftBank shares plunge over 11% amid broader tech sell-off
India's viral 'Cockroach' party has millions of followers. What investors need to know
Best progressive eyeglasses - Warby Parker vs. local optometrist
Tell Me Your Favorite ***** of the Day Websites
Widow's Bay: Your Baggage
Inside Wealth: Soaring stocks created 2 million new millionaires around the world last year
SpaceX IPO hype has traders flocking to this mid-cap stock