Author Topic: Data too long for column 'content' at row 1  (Read 22102 times)

mvieke

  • Guest
Data too long for column 'content' at row 1
« on: January 29, 2006, 05:44:16 PM »
I'm trying to create a WYSIWYG page, but when I try to save it I get the following error: "Data too long for column 'content' at row 1"

Is there some limit to the page size? I am trying to paste in a fairly large table.

If there is a limit can anyone recommend a solution for making long pages?

Offline kweitzel

  • Posts: 6986
    • Weitzel EDV - multilingual IT services
Re: Data too long for column 'content' at row 1
« Reply #1 on: January 29, 2006, 05:56:32 PM »
Hi ... I think this kind of data just calls for beeing stored in teh database and then called up, once the page is beeing loaded ...

Obviously you would need to do a bit of PHP coding and get the data into a table in the DB. You could then set up the whole page with a WYSIWYG Header, the PHP Table Loop (a codepage) and a WYSIWYG Footer.

Take a look at how some of the modules handle the loop section and go for it (providing you feel comfortable coding in PHP, unlike me ...)

Any other ideas? Cheers

Klaus
WebsiteBaker Org e.V. - for WebsiteBaker


mvieke

  • Guest
Re: Data too long for column 'content' at row 1
« Reply #2 on: January 30, 2006, 03:44:33 PM »
I'm doing a project for a local business, and they are definitely not technically competent to use PHP. Let me describe the application.

This company want to publish some auction results on their website. There are normally over 200 items in each auction. I was hoping they could just copy/paste their results from MS Word into the WYSIWYG page. I think the HTML code for the table is too large for the database.

Can anyone recommend an easy solution to allow me to do this?


Offline dhdesign

  • Posts: 35
Re: Data too long for column 'content' at row 1
« Reply #3 on: January 30, 2006, 04:12:07 PM »
This company want to publish some auction results on their website. There are normally over 200 items in each auction. I was hoping they could just copy/paste their results from MS Word into the WYSIWYG page. I think the HTML code for the table is too large for the database.

Can anyone recommend an easy solution to allow me to do this?

Whenever they copy/paste the results from MS Word into the WYSIWYG editor, they are dragging along all the formatting code from MS Word.

Have them put the results into a plain text editor (Notepad), do some minimal formatting, then have them paste it into the WYSIWYG editor in WB and finish formatting it there.  That way, they are only copying over the text, not all the MS code as well.  :wink:

pcwacht

  • Guest
Re: Data too long for column 'content' at row 1
« Reply #4 on: January 30, 2006, 04:24:53 PM »
It could only have to do with 1 thing
error is :
Code: [Select]
Data too long for column 'content' at row 1"
Or the amount of data you wanna store in the field 'content' is more then that field can have.

look at your database table wysiwyg, the content field, it is typed as 'text'
this page : http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html
says it could hold ( L+2 bytes, where L < 2^16  ) 65536 +2 bytes

If you need more change it to mediumtext or longtext wich could hold the most (L+4 bytes, where L < 2^32) wich is 65536*65536 +4


Good luck,
John

mvieke

  • Guest
Re: Data too long for column 'content' at row 1
« Reply #5 on: January 30, 2006, 09:40:40 PM »
dhdesign,
Word, Excel and Frontpage all add a bunch of "junk code" but the table is so large that it is not feasible to manually remove all the office stuff that is automatically added. I would love some suggestions on how to automate it.

pcwacht,
I changed the content and text rows  in the database to longtext, and now I can save everything without any problem.


Thanks a lot, you were both a big help to me

Offline rabsaul

  • Posts: 271
    • http://www.pactumgroup.com
Re: Data too long for column 'content' at row 1
« Reply #6 on: August 16, 2006, 03:48:36 AM »
It could only have to do with 1 thing
error is :
Code: [Select]
Data too long for column 'content' at row 1"
Or the amount of data you wanna store in the field 'content' is more then that field can have.

look at your database table wysiwyg, the content field, it is typed as 'text'
this page : http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html
says it could hold ( L+2 bytes, where L < 2^16  ) 65536 +2 bytes

If you need more change it to mediumtext or longtext wich could hold the most (L+4 bytes, where L < 2^32) wich is 65536*65536 +4
I'm facing the same problem - WB pages aren't allowing enough data to show for long articles. I have been attempting the above, but haven't got it to work. In phpMyAdmin, I am at the wysiwyg page. In the text row, I click change, and alter the type to longtext. No workie. (I also tried changing the *field* to longtext as well, but then the page wouldn't even save.) Do I need to change something in the "attributes" as well? What exactly do I need to do?

Thanks!

Offline rabsaul

  • Posts: 271
    • http://www.pactumgroup.com
Re: Data too long for column 'content' at row 1
« Reply #7 on: August 16, 2006, 03:51:34 AM »
Duh. Never mind. I see I was supposed to modify the content field, and I was modifying the text field. Got it!  :-D

Offline kweitzel

  • Posts: 6986
    • Weitzel EDV - multilingual IT services
Re: Data too long for column 'content' at row 1
« Reply #8 on: August 16, 2006, 11:18:39 AM »
A different approach would be to automat the formatting of the word document. Make a script which opens the document and saves it as textfile then reopens the textfile lets say in wordpad. Then let your client copy it from Wordpad (or even notepad) to WB. With VB-Script it should not be a problem.

Or, if it is tables you are after, let the script export it as CSV (comma separated values) and copy it to the webservers datadirectory. Then use a little PHP-Script on a codepage to parse these files and output the sesults.

cheers

Klaus
WebsiteBaker Org e.V. - for WebsiteBaker


Offline masarin

  • Posts: 56
Re: Data too long for column 'content' at row 1
« Reply #9 on: May 30, 2008, 12:47:55 AM »
Quote
It could only have to do with 1 thing
error is :
Code:

Data too long for column 'content' at row 1"


Or the amount of data you wanna store in the field 'content' is more then that field can have.

look at your database table wysiwyg, the content field, it is typed as 'text'
this page : http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html
says it could hold ( L+2 bytes, where L < 2^16  ) 65536 +2 bytes

If you need more change it to mediumtext or longtext wich could hold the most (L+4 bytes, where L < 2^32) wich is 65536*65536 +4

With WB 2.7 this issue is fixed for WYSIWYG Pages, but not for the News Modul.
With the help of this post I figured out how to change that one too:

In phpMyAdmin go to mod_news_post, then look for the field content_long and change its type to LONGTEXT.

That's it