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

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

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:
Gemini success to drive Alphabet shares to $400, cause OpenAI to cut capex, says Pivotal
Warren Buffett's Berkshire Hathaway nailed the timing on Alphabet — whether by design or not
The market likes what it heard from the Fed — plus, Lilly's new $6B manufacturing investment
Trump trade rep changes China soybean purchase timeline, cites 'discrepancy'
Rivian turns to AI, autonomy to woo investors as EV sales stall
Nvidia has a cash problem — too much of it
Homeland Security Dept. buying Boeing 737s for ICE deportations
Thursday's big stock stories: What’s likely to move the market in the next trading session
Trump says U.S. seized oil tanker off the coast of Venezuela
Oracle plummets 11% on weak revenue, pushing down AI stocks like Nvidia and CoreWeave