Text Gets Trimmed

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
kkonline
Forum Contributor
Posts: 251
Joined: Thu Aug 16, 2007 12:54 am

Text Gets Trimmed

Post by kkonline »

Hi I am using Joomla 1.0.5 as a cms on my site. Recently I have been facing a wierd issue. Whenever i add an article more than 2000 words it gets cut.

By default the it is stored as mediumtext on the backend. Is it because of this sql limitation... how can I increase it to maximum words? what type of firld should i choose?

Please suggest
User avatar
novice4eva
Forum Contributor
Posts: 327
Joined: Thu Mar 29, 2007 3:48 am
Location: Nepal

Re: Text Gets Trimmed

Post by novice4eva »

I just read that the maximum length for mediumtext is 16,777,215 character, even with mutibyte characters you should be able to store more than that. Is there a way you can check/echo your query for insert so that we can know if something done in PHP is doing this or if a procedure is a culprit.
shannah78
Forum Newbie
Posts: 3
Joined: Wed Dec 31, 2008 12:37 pm

Re: Text Gets Trimmed

Post by shannah78 »

A couple of things to look at:

1. Change the field to type LONGTEXT

2. This can also happen if your article contains some illegal characters (or ones that MySQL doesn't like) and Joomla is not sanitizing the input properly. You can test for this case by finding the point where the text is being cut off, then try deleting a chunk from the beginning of your article and try to resave again. If it is cut off at the same point in the text despite the text being different lengths, you likely have a rogue character (could be hidden).

-Steve
Post Reply