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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chertzog’s picture

Status: Active » Needs review
FileSize
876 bytes

This 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.

gboudrias’s picture

Issue tags: -Aegir 3.0.0 +Aegir 3.1

This 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".

gboudrias’s picture

Status: Needs review » Needs work

The update doesn't seem to work for me (MySQL):

Update #7301

    Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB/TEXT column 'filename' can't have a default value: ALTER TABLE {hosting_package_instance} CHANGE `filename` `filename` MEDIUMTEXT NOT NULL DEFAULT ''; Array ( ) in db_change_field() (line 3020 of /var/aegir/hostmaster-7.x-3.0/includes/database/database.inc).
formatC'vt’s picture

Status: Needs work » Needs review
FileSize
15.48 KB

I think 16kb of text is enough for file path.
Also i think .install file needs a cleanup because i doesn't see a reason for update functions from old versions of this module.

gboudrias’s picture

Issue tags: -Aegir 3.1
SocialNicheGuru’s picture

Status: Needs review » Reviewed & tested by the community

This works.

  • helmo committed a75a595 on 7.x-3.x
    Issue #2459403 by chertzog, formatC'vt: String data, right truncated:...
helmo’s picture

@formatC'vt acording to the api docs we should leave it in.

A good rule of thumb is to remove updates older than two major releases of Drupal. See hook_update_last_removed() to notify Drupal about the removals.

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.

formatC'vt’s picture

My bad, never heard about it

helmo’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +Aegir 3.2

Forgot the status change ...

  • helmo committed cb0ec15 on 7.x-3.x
    Issue #2459403 by helmo: Fix typo in schema
    
helmo’s picture

The patch from #4 has a small error, fixed it in the commit #11

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.