Half of post chopped off!

Found something that doesn't work as expected? Encountered PHP errors? Submit your bug reports here!
User avatar
wgroleau
Posts: 402
Joined: Sat Jun 10, 2006 4:20 pm
Location: Indiana / USA

Half of post chopped off!

Postby wgroleau » Mon Nov 04, 2013 5:05 am

Does SQL have a limit to the size of a block of text that can be inserted in one data field?

I posted an article to
http://ideas.lang-learn.org/WWW.php?catid=54&blogid=8
and when I tried to view it the whole page was trashed.

DOM inspector showed that some elements did not get closed, but inspecting them in the HTML showed garbage I could not have written followed by generated blog stuff.

Inspecting my original (I composed it in HTML separately) showed the garbage was not in my original and that the place was nowhere near the end of the post.

I selected edit and saw that the article ended at the = of a tag's attribute. Nothing abnormal at that location in the original.

Copied the whole thing out of the editor and pasted into a TextEdit window and saved. Result contained 61563 bytes. Actual article is 110387

61563 is close enough to 64K that I am suspicious there…

Or is it a limit on parameter size in the HTML FORM submission?
Wes Groleau
User avatar
WillyP
Nucleus Guru
Nucleus Guru
Posts: 872
Joined: Sun Aug 30, 2009 3:29 am
Location: Pembroke, NH
Contact:

Postby WillyP » Mon Nov 04, 2013 1:40 pm

Yes, the database does have limits to the size of data you can enter. This can be set by the host. There may also be limits in the Nucleus script, though I don't know that for sure.
User avatar
slightlysome
Posts: 213
Joined: Thu Feb 24, 2011 1:33 am
Contact:

Postby slightlysome » Mon Nov 04, 2013 2:43 pm

Did a check on this, and the culprit is that Nucleus uses mysql database columns with type TEXT to store the item body and item extended. The TEXT datatype is max 65,535 bytes. See http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html.

Nucleus should change the item table to use the MEDIUMTEXT datatype for item body and item extended. This will let you store 16,777,215 bytes in each column.

You could try to change the datatype for the columns yourself. This would probably work. (I haven't tested this so I take no responsibility for any problems.. :) )
- Leo -
LMNucleus CMS home page: nucleus.slightlysome.net
My Nucleus powered blogs: www.slightlysome.net - www.tswtraveler.com
My Nucleus plugins.
User avatar
wgroleau
Posts: 402
Joined: Sat Jun 10, 2006 4:20 pm
Location: Indiana / USA

Postby wgroleau » Mon Nov 04, 2013 6:31 pm

Thanks. I'll consider making that change.
For this one, I just split it into three parts to post separately.
Might consider that change in the core, although can you change the type of a column with data in it?
Wes Groleau
User avatar
WillyP
Nucleus Guru
Nucleus Guru
Posts: 872
Joined: Sun Aug 30, 2009 3:29 am
Location: Pembroke, NH
Contact:

Postby WillyP » Tue Nov 05, 2013 2:24 pm

Hmm. I must have been thinking of upload size in PHP when I wrote that post.

Is there any reason to limit a post to 65,535? That's a lot of text, but for certain types of blogs, not unreasonable.

Just to see an example of how much text it is, I entered 65535 here: Lorem Ipsum - All the facts - Lipsum generator and it "Generated 150 paragraphs, 13472 words, 91465 bytes of Lorem Ipsum".

That's a huge amount of text... are you storing pics in the database as text too?
User avatar
yama
Posts: 122
Joined: Tue Dec 05, 2006 2:23 pm
Contact:

Postby yama » Mon Sep 08, 2014 10:42 am


Return to “Bug Reports & Feature Requests”