Specified key was too long?

chris.paschen

Chris Paschen
We're getting the error:
"Specified key was too long; max key length is 1000 bytesSpecified key was too long; max key length is 1000 bytes"
at the top of one of our forms.
This is a one-to-many configuration and when this error appears it causes the repeating many records to not save properly.

In tracking this down, it appears to be related to a fileupload field that we are using that uploads files to our Amazon S3 bucket.
We're using this for uploading a video file (.mp4). The files are large; however, the issue doesn't appear to be related to the actual size of the video file.
If we leave this field empty, the form works fine, but uploading a video (using this file upload) causes the error.

We've been using this form/element for over a year without a problem until sometime after upgrading to J3.4.8.

In the file upload element we have the following configurations:

OPTIONS
Max file size: 368640
Allowed File Types .mp4,.m4v

DISPLAY
Show media in list: No
Show media in form: No

STORAGE
Storage Type: Amazon S3
SSL: Yes
Include server path: No
Access Public read
Skip Exist Check: No
s3Auth URL: 180

Items uploaded previously with this are displaying fine without a problem.
Items uploaded now - in addition to getting the error above (on the admin), the video file doesn't appear to be available (on the front-end).


We're running Fabrik 3.4.3, updated to github on 2016-04-30.
The Fabrik Element - File Upload is version 3.4.3, March 2016.
Joomla 3.5.1, PHP 5.6.16.

Any ideas what might be going wrong?
I've tried almost everything I can think of :-(
 
Can you look at your underlying table scheme, and see what data type the upload element's field is, and specifically if it's a VARCHAR, what length it is?
 
Underlying table field:
Type: text
Collation: utf8_general_ci
Null: Yes
Default: NULL

Bucketname+path is only 62 chars, so full path (incl. filename) isn't likely to be more than 1,000 (and isn't in the test cases - usually just 110-150 chars)

AJAX upload is set to: NO
 
I'm kind of at a loss as well. As far as I know (and I've double checked the code) we only ever create indexes when saving things on the backend, like when creating a table, changing a group by, setting an element to be filterable, etc. And again, as far as I know that error only gets thrown by MySQL when creating an index.

The only way I can make any headway with this is to look at your site, but that's going to be time consuming ...

Find me on Skype (I think you already have me in your contacts?).

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top