After installing the deploy and services modules into an existing drupal installation, I tried to add a user and received the following errors:

warning: pg_query() [function.pg-query]: Query failed: ERROR: value too long for type character varying(32) in /var/www/stdrupal/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO node_uuid (nid, uuid) values (320, '14443314674c76d2c540d899.61453918') in /var/www/stdrupal/modules/deploy/modules/deploy_uuid/deploy_uuid.install on line 144.

Looks like a column in the table node_uuid is too short for the values being submitted to it. Has anyone encountered this problem before? Is there a workaround available? What happens if I turn off the UUID module?

Thanks for any assistance,

Presley

CommentFileSizeAuthor
#4 deploy-895692.patch650 bytesahtih

Comments

ringleader’s picture

Assigned: Unassigned » ringleader
Status: Active » Fixed

We solved this by altering the guilty column in postgress phppgadmin.

Status: Fixed » Closed (fixed)

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

ahtih’s picture

Assigned: ringleader » Unassigned
Status: Closed (fixed) » Active

It definitely still happens:

warning: pg_query(): Query failed: ERROR: value too long for type character varying(32) in /usr/share/drupal/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO node_uuid (nid, uuid) values (98531, '16007811294cdeac05e17d21.00282134') in /etc/drupal/all/modules/deploy/modules/deploy_uuid/deploy_uuid.install on line 144.

I have lots of nodes (10000+) so perhaps that triggers it.

ahtih’s picture

StatusFileSize
new650 bytes

The reason seems obvious: UUIDs are generated with uniqid(rand(),TRUE), which means its maximum length is 10+23 = 33 chars. At the same time, deploy_uuid_get_field_definition() specifies field max length of 32.

Here is a patch which changes field definition to 33 chars. I'm not sure if we need to have an update hook as well, to change it in existing installations? Perhaps not, as existing installations (at least on PostgreSQL) probably do not work anyway due to this bug?

ahtih’s picture

Status: Active » Needs review
dixon_’s picture

To help version 6.x-1.x move forward, please see this issue: #526936: Find best way to proceeding with 6.x-1.x and more specifically this comment: http://drupal.org/node/526936#comment-4931548

manuel garcia’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

6.x branch is no longer supported.