Closed wbraswell closed 8 years ago
As discussed on IRC, that's a MySQL 'text' column, which can contain up to 65k characters. As a workaround for your own site, you could run the following command: alter table cms_page_element change column content content longtext;
Be warned that this is untested - if you have a lot of pages, or a lot of elements per page, then this might make your database quite large.
I'll look at catching overly-large posts and either throwing an error, or more likely truncating them and warning the user.
For now I will just figure out ways not to exceed the size limit, as I don't much like the idea of untested database changes.
Yay, at least we don't have a database bug any more! :+1:
By copying-and-pasting HTML content from a previously-existing website into CKEditor's "source" edit mode, I was able to exceed the storage length limitation of DBIC:
FastCGI: server "/tmp/shacfleet.org.fcgi" stderr: [error] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data too long for column 'content' at row 1 [for Statement "UPDATE
cms_page_element
SETcontent
= ? WHERE (id
= ? )" with ParamValues: 0=', referer: http://shacfleet.org/admin/pages/page/10/edit
There should at least be some kind of meaningful error message produced.