Post is getting cliped before the end

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
norm_crawford
Posts: 2
Joined: Wed Jan 13, 2010 5:15 am

Post is getting cliped before the end

Post by norm_crawford »

My first post is real long and I can't get the text posted all the way to the end.
Is there some kind of a limit on how long a post can be?
The site is: uncorrectable government databases.com (without the spaces)
Thanks in advance
Norm
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Post is getting cliped before the end

Post by garvinhicking »

Hi!

Serendipity's database table has a cap of around 65kb. If you use MySQL, you could use a tool like phpMyAdmin to change the columns "body" and "extended" in the database table "serendipity_entries" vom "text" to "Longtext".

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Post is getting cliped before the end

Post by Don Chambers »

You might want to consider using the event plugin "Split long entries" (serendipity_event_entrysplit), the description of which is:
Enables you to split longer entries into several subpages and provides you with an auto-generated table of contents
I do not know if this plugin increases the 65kb limit Garvin mentioned - I have never used it.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Post is getting cliped before the end

Post by garvinhicking »

Hi Don!

Actually, sadly this plugin wouldn't help, because the DB storage limit is 65kb.

I now changed s9y 1.6 for new installations to use LONGTEXT by default...

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Post is getting cliped before the end

Post by Don Chambers »

garvinhicking wrote:Hi Don!

Actually, sadly this plugin wouldn't help, because the DB storage limit is 65kb.

I now changed s9y 1.6 for new installations to use LONGTEXT by default...

Best regards,
Garvin
Can an existing database be modified to use LONGTEXT without upgrading to 1.6 beta? What implications, if any, come with this switch to LONGTEXT? Any search implications?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Post is getting cliped before the end

Post by garvinhicking »

Hi!

The database only gets a little bit bigger, other than that, no problems are to be expected.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Post is getting cliped before the end

Post by Don Chambers »

Finally found the time to tinker with this today.

Perhaps the upgrade should change body and extended to longtext? I had to do it manually for an existing site that I upgraded to 1.6 beta.

Testing in 2 different templates (one of my complex ones, and also Serendipity 3.0 by Carl)... These templates display the extended body as {$entry.extended}. Despite the change of body and extended to longtext, this smarty variable is still limited to approx 62k characters. However, if directly editing the entry, or viewing the record via phpMyAdmin - the entire entry does exist in the database with the new longtext column type.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Post is getting cliped before the end

Post by garvinhicking »

Hi!

Your problem might be related to other plugins, like maybe the Caching plugin. The sizes of entrpyoperties still have TEXT columns. For those, changing it to LONGTEXT might be a more considerable size increase, because this field can hold much more entries. I would need to do some research on that before switching it...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Post is getting cliped before the end

Post by Don Chambers »

I do believe it is the caching of entries via the extended properties plugin that is causing it to be clipped. If disabled, extended body is no longer truncated. My concern, however, is the performance impact of not using the cached body and extended body.

Let me know what, specifically, you might want to try or test.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Post is getting cliped before the end

Post by garvinhicking »

Hi!

Simply set your serendipity_entryproperties DB table to have "value" be also "longtext". (and then re-cache)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Post is getting cliped before the end

Post by Don Chambers »

garvinhicking wrote:Hi!

Simply set your serendipity_entryproperties DB table to have "value" be also "longtext". (and then re-cache)

Regards,
Garvin
That's what my instinct said to do, but you made me nervous with your comment above:
garvinhicking wrote:For those, changing it to LONGTEXT might be a more considerable size increase, because this field can hold much more entries. I would need to do some research on that before switching it...
You think it will have much impact?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Post is getting cliped before the end

Post by garvinhicking »

Hi!
You think it will have much impact?
As onli indicated, you should get a size increase by multiplicating the number of rows in your serendipity_entryproperties, multiplay it by two, and you should get the new bytes.

Say you have 2000 blog articles, each one usually has about 4-5 entryproperties. That means you have 10.000 entries inside entryproperties, this would mean an increase of 20kb in your database. That shouldn't be too hard, but before putting it in the official s9y release, we should test it :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Post is getting cliped before the end

Post by Don Chambers »

I didn't do a "before & after" check of the table/db size.... but it does not sound too bad to me. :wink:

Oh, and Judebert committed a patch yesterday to the split entries plugin that corrects errors I reported above. I never have been able to communicate consistently with cvs! SVN is no problem, but cvs has always been a headache!
=Don=
Post Reply