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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | deploy-895692.patch | 650 bytes | ahtih |
Comments
Comment #1
ringleader commentedWe solved this by altering the guilty column in postgress phppgadmin.
Comment #3
ahtih commentedIt 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.
Comment #4
ahtih commentedThe 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?
Comment #5
ahtih commentedComment #6
dixon_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
Comment #7
manuel garcia commented6.x branch is no longer supported.