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

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

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:
Trump administration equity stakes pose risks to U.S. companies and markets
First the quarter zip, now a '401(k) mullet' — what Gen Z trends say about the economy
In reversal, Trump backs Nexstar's proposed acquisition of Tegna
The new Bilt 2.0 cards are open for application. Here's how to decide which card is right for you
Pressure mounts on American Airlines CEO as carrier lags rivals
Trump’s 'big beautiful bill' may spur significant changes to higher education in 2026 and the rise of 'un-college,' experts say
Top Wall Street analysts like these stocks for long-term growth potential
Hims & Hers pulls copycat weight-loss pill after threats of legal action
Epstein files: UK PM Starmer's top aide McSweeney quits over Mandelson scandal
NFL plans to have discussions with partners outside of core media for live games, media chief says