[Solved] Maximum number of characters per entry

Found a bug? Tell us!!
Post Reply
deedw
Regular
Posts: 61
Joined: Thu Oct 07, 2010 5:57 am

[Solved] Maximum number of characters per entry

Post 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
Last edited by deedw on Mon Aug 29, 2022 3:21 pm, edited 1 time in total.
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Maximum number of characters per entry

Post by onli »

Your database is MySQL or a MariaDB variant?
deedw
Regular
Posts: 61
Joined: Thu Oct 07, 2010 5:57 am

Re: Maximum number of characters per entry

Post by deedw »

Should be MySQL I think.
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Maximum number of characters per entry

Post 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...
deedw
Regular
Posts: 61
Joined: Thu Oct 07, 2010 5:57 am

Re: Maximum number of characters per entry

Post 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
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: [Solved] Maximum number of characters per entry

Post by onli »

Your installation might be so old that this upgrade task failed back then oO

But I'm happy it is solved now!
Post Reply