Page 1 of 1

[Solved] Maximum number of characters per entry

Posted: Fri Aug 12, 2022 8:36 pm
by deedw
Hi,

I had it several times that I wrote a blog post, looked at the preview, everything looked fine, I saved it, still fine in the editor window and when I looked at the post in the blog itself it got truncated. One example: http://www.deesaster.org/blog/index.php?/archives/2905

The last paragraph is incomplete. I can edit it again and in the preview and editor window it's okay. But after looking at the blog post it got truncated again.

Is there a maximum number of characters in a posting? Something like 655536 for example? And can I increase it?

Best regards
Dee

Serendipity 2.3.5 und PHP 7.4.29

Re: Maximum number of characters per entry

Posted: Mon Aug 15, 2022 12:09 pm
by onli
Your database is MySQL or a MariaDB variant?

Re: Maximum number of characters per entry

Posted: Fri Aug 26, 2022 9:24 pm
by deedw
Should be MySQL I think.

Re: Maximum number of characters per entry

Posted: Fri Aug 26, 2022 10:23 pm
by onli
Then the maximum entry length should be a lot bigger. It's supposed to be a LONGTEXT field, which is utter overkill, according to https://chartio.com/resources/tutorials ... ata-types/ goes up to 4GB of text. It's of course possible that the index on those columns gives it a smaller limit, but that's also marked as fulltext and I'd expect no practical limitation...

Best you can do is to check how the database looks like, the serendipity_entries table. Maybe the entries or extended column is somehow just a regular TEXT? Then we'd have that 64K character limit (or less, with utf8mb4).

The browser could also truncate what it sends to serendipity, but then I'd expect the preview to also be truncated. That the PHP layer truncates it is not likely, there would be no reason to and variables in PHP should not have such a limit...

Re: Maximum number of characters per entry

Posted: Mon Aug 29, 2022 3:16 pm
by deedw
Best you can do is to check how the database looks like, the serendipity_entries table. Maybe the entries or extended column is somehow just a regular TEXT? Then we'd have that 64K character limit (or less, with utf8mb4).
As far as I see it in phpmyadmin the column "body" is marked as "TEXT". I will backup the DB and change it to LONGTEXT.

Edit: That solved the problem. Thanks!

Best regards
Dee

Re: [Solved] Maximum number of characters per entry

Posted: Mon Aug 29, 2022 3:35 pm
by onli
Your installation might be so old that this upgrade task failed back then oO

But I'm happy it is solved now!