Elxis CMS Forum

Support => General => Topic started by: seadhna on February 16, 2022, 15:00:40

Title: Maximum Page Length?
Post by: seadhna on February 16, 2022, 15:00:40
Hi,
there seems to be a maximum length allowed by the CMS for a single article (approx. 63454 characters).
Is it possible to change this or is there a solution to making a page longer than this (I know it's very long - it's a special case, a long sortable table).
It seems like perhaps one solution is to put the content in a module instead of in the article.
Title: Re: Maximum Page Length?
Post by: armpouniotis on February 17, 2022, 20:03:04
If you use pagebreak plugin in your articles, maybe you would find a solution to your problem...
Title: Re: Maximum Page Length?
Post by: datahell on February 19, 2022, 13:59:11
The limitation is not from Elxis but from the database.

Database columns "introtext" and "maintext" which store the introduction and main article's text respectively are of type TEXT which has a maximum length of 65535 bytes. This is equal to 10 pages of HTML text. I believe this is enough for an article. If this is not enough for you you can change it to MEDIUMTEXT. Be careful if you copy-paste HTML from word you might have a large text due to the garbage html you copy from word. I have seen this several times. If you clean the html you will have 10 times less size.

Here are the limits of each TEXT data type for MySQL database:

TEXT 65,535 bytes ~64kb
MEDIUMTEXT 16,777,215 bytes ~16MB
LONGTEXT 4,294,967,295 bytes ~4GB

I believe you are only insteresting in article's main text, so here are the instruction to change it from TEXT to MEDIUMTEXT:

Go to your PHPMyAdmin and your database, go to table "elx_content", click to view table structure, click column "maintext" to edit it.
Change type from "TEXT" to "MEDIUMTEXT" and click Save (See attached screenshot).

Or execute the MySQL command below:
ALTER TABLE `elx_content` CHANGE `maintext` `maintext` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

Note: Change "elx_" to your database tables prefix if you use an other prefix than "elx_".

Title: Re: Maximum Page Length?
Post by: seadhna on February 21, 2022, 12:06:00
Thank you very much! This is very interesting and helpful.