I was installing the campaignion platform and the filename is too long.
String data, right truncated: 1406 Data too long for column 'filename' at row 1: INSERT INTO {hosting_package_instance}
WD php: PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'filename' at row 1: INSERT INTO {hosting_package_instance} (rid, package_id, filename, schema_version, version, version_code, status, platform) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 7856 [:db_insert_placeholder_1] => 1993 [:db_insert_placeholder_2] => /var/aegir/platforms/7/servers/contrib/campaignion_starterkit-7.x-1.x-dev/profiles/campaignion_starterkit/modules/clientside_validation/clientside_validation_testswarm/features/clientside_validation_test_field_validation/clientside_validation_test_field_validation.module [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 7.x-1.41 [:db_insert_placeholder_5] => 70001410500 [:db_insert_placeholder_6] => 0 [:db_insert_placeholder_7] => 1718 ) in hosting_package_instance_create() (line 149 of /var/aegir/hostmaster-7.x-3.x/profiles/hostmaster/modules/aegir/hosting/package/hosting_package.instance.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | update-filename-db-field-hosting-package-2459403-4.patch | 15.48 KB | formatC'vt |
| #1 | 159605-update-filename-db-field-hosting-package.patch | 876 bytes | chertzog |
Comments
Comment #1
chertzogThis is because the string
"/var/aegir/platforms/7/servers/contrib/campaignion_starterkit-7.x-1.x-dev/profiles/campaignion_starterkit/modules/clientside_validation/clientside_validation_testswarm/features/clientside_validation_test_field_validation/clientside_validation_test_field_validation.module"
is 272 characters long, and the db field is limited to 255.
Here is a patch that changes the field to a medium size textfield.
Comment #2
gboudrias commentedThis wasn't released in 3.0 as far as I'm aware, someone please correct me if I'm wrong. So it's still "needs review".
Comment #3
gboudrias commentedThe update doesn't seem to work for me (MySQL):
Comment #4
formatC'vt commentedI think 16kb of text is enough for file path.
Also i think
.installfile needs a cleanup because i doesn't see a reason for update functions from old versions of this module.Comment #5
gboudrias commentedComment #6
socialnicheguru commentedThis works.
Comment #8
helmo commented@formatC'vt acording to the api docs we should leave it in.
Lets not distract this issue with that cleanup... and if we remove these functions it should be done in all sub-modules.
I've commited the new update hook and schema change.
Comment #9
formatC'vt commentedMy bad, never heard about it
Comment #10
helmo commentedForgot the status change ...
Comment #12
helmo commentedThe patch from #4 has a small error, fixed it in the commit #11