Niels Mayer wrote:
> In 1.8, if too much data is entered in a doc's ?editor=object
> fieldXWiki.JavaScriptExtension[] (say
> a big chunk of JSON on the order of 97783 bytes) you can no longer save
> without getting an underlying error. This appears related to the following:
> com.xpn.xwiki.objects.LargeStringProperty -->
> com.mysql.jdbc.MysqlDataTruncation:
> Data truncation: Data too long for column 'XWL_VALUE' at row 1
> 
> How can this be changed to allow for a larger limit on entries? Fortunately,
> http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents3 ( src
> <http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents3/Exhibit.Presidents3.xar>)
> has entries small enough, but as you grow the amount of Javascript data you
> hold in a XWiki.JavaScriptExtension you eventually get a failure like this:

This is a LargeStringProperty, which by defaults is configured to hold 
at least 60000 chars. In mysql, this translates to a TEXT column, which 
can hold 65,535 characters.

Locally, you can alter the xwikilargestrings table to convert the 
XWL_VALUE column to MEDIUMTEXT to get past this issue.

Globally, we can consider increasing the size for this field, but I 
don't know if it's a good idea. You should keep your files small. On the 
other hand, this also affects other objects, so for example long blog 
articles won't fit.

Another idea is to put the file as an attachment on the skin document, 
or in the filesystem, and call it with the jsfx plugin instead of the 
jsx one. The drawback is that it will be a bit harder to edit, as you 
will need to change it locally and then re-attach it.
-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to