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

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

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:
Novo Nordisk moves next-gen drug amycretin to late-stage diabetes trial after promising data
Multifamily housing leads CRE bid competition in October
Applying to jobs from Thanksgiving to New Year's isn't pointless, experts say: 'You actually have more opportunity to stand out'
Here are Tuesday's biggest analyst calls: Nvidia, Apple, Tesla, Microsoft, Oracle, Live Nation, Coinbase & more
Private payroll losses accelerated in the past four weeks, ADP reports
Core wholesale prices rose less than expected in September; retail sales gain
Sen. Jim Justice, wife sued for $5 million in unpaid taxes from 2009 as legal woes mount
Michael Burry's next 'Big Short': An inside look at his analysis showing AI is a bubble
CNBC's Official NHL Team Valuations 2025: Here's how the 32 franchises stack up
Consumer confidence hits lowest point since April as job worries grow