Welcome, Guest. Please login or register.
Did you miss your activation email?
April 24, 2014, 12:36:38 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
177459 Posts in 24325 Topics by 6877 Members
Latest Member: chickenjoe
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Data too long for column 'content' at row 1  (Read 19845 times)
mvieke
Guest
« 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?
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6991


WWW
« 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
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

mvieke
Guest
« 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?

Logged
dhdesign

Offline Offline

Posts: 35


« 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
Logged
pcwacht
Guest
« Reply #4 on: January 30, 2006, 04:24:53 PM »

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


Good luck,
John
Logged
mvieke
Guest
« 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
Logged
rabsaul

Offline Offline

Posts: 271


WWW
« Reply #6 on: August 16, 2006, 02:48:36 AM »

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
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!
Logged
rabsaul

Offline Offline

Posts: 271


WWW
« Reply #7 on: August 16, 2006, 02: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!  grin
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6991


WWW
« Reply #8 on: August 16, 2006, 10: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
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

masarin

Offline Offline

Posts: 56


« Reply #9 on: May 29, 2008, 11:47:55 PM »

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
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!