ERROR:  invalid input syntax for integer: "Array" at character 172
Jan 24 18:30:40 db postgres[30169]: [2-2]  {22P02} STATEMENT:  INSERT INTO field_data_weight (entity_type, entity_id, revision_id, bundle, delta, language, weight_value) VALUES ('node', '2403', '2403', 'eyeglass_display', '0', 'und', 'Array')
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

davisben’s picture

Status: Active » Postponed (maintainer needs more info)

Could you provide a bit more info? What were you attempting to do that caused this error?

dema502’s picture

I try to change weight through views - url http://site.com/weight
I've modified this view add node type and language field and expose filters

$view = new view;
$view->name = 'weight';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Weight';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Weight';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'assign node weight';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
  'title' => 'title',
  'weight' => 'weight',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
  'title' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'weight' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
);
$handler->display->display_options['style_options']['override'] = 1;
$handler->display->display_options['style_options']['sticky'] = 0;
$handler->display->display_options['style_options']['empty_table'] = 0;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Weight: Weight */
$handler->display->display_options['fields']['weight']['id'] = 'weight';
$handler->display->display_options['fields']['weight']['table'] = 'field_data_weight';
$handler->display->display_options['fields']['weight']['field'] = 'weight';
$handler->display->display_options['fields']['weight']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['weight']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['weight']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['weight']['alter']['external'] = 0;
$handler->display->display_options['fields']['weight']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['weight']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['weight']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['weight']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['weight']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['weight']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['weight']['alter']['trim'] = 0;
$handler->display->display_options['fields']['weight']['alter']['html'] = 0;
$handler->display->display_options['fields']['weight']['element_label_colon'] = 1;
$handler->display->display_options['fields']['weight']['element_default_classes'] = 1;
$handler->display->display_options['fields']['weight']['hide_empty'] = 0;
$handler->display->display_options['fields']['weight']['empty_zero'] = 0;
$handler->display->display_options['fields']['weight']['hide_alter_empty'] = 1;
/* Field: Content: Type */
$handler->display->display_options['fields']['type']['id'] = 'type';
$handler->display->display_options['fields']['type']['table'] = 'node';
$handler->display->display_options['fields']['type']['field'] = 'type';
$handler->display->display_options['fields']['type']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['type']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['type']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['type']['alter']['external'] = 0;
$handler->display->display_options['fields']['type']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['type']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['type']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['type']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['type']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['type']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
$handler->display->display_options['fields']['type']['alter']['html'] = 0;
$handler->display->display_options['fields']['type']['element_label_colon'] = 1;
$handler->display->display_options['fields']['type']['element_default_classes'] = 1;
$handler->display->display_options['fields']['type']['hide_empty'] = 0;
$handler->display->display_options['fields']['type']['empty_zero'] = 0;
$handler->display->display_options['fields']['type']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['type']['link_to_node'] = 0;
$handler->display->display_options['fields']['type']['machine_name'] = 0;
/* Field: Content translation: Language */
$handler->display->display_options['fields']['language']['id'] = 'language';
$handler->display->display_options['fields']['language']['table'] = 'node';
$handler->display->display_options['fields']['language']['field'] = 'language';
$handler->display->display_options['fields']['language']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['language']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['language']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['language']['alter']['external'] = 0;
$handler->display->display_options['fields']['language']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['language']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['language']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['language']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['language']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['language']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['language']['alter']['trim'] = 0;
$handler->display->display_options['fields']['language']['alter']['html'] = 0;
$handler->display->display_options['fields']['language']['element_label_colon'] = 1;
$handler->display->display_options['fields']['language']['element_default_classes'] = 1;
$handler->display->display_options['fields']['language']['hide_empty'] = 0;
$handler->display->display_options['fields']['language']['empty_zero'] = 0;
$handler->display->display_options['fields']['language']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['language']['link_to_node'] = 0;
$handler->display->display_options['fields']['language']['native_language'] = 0;
/* Sort criterion: Weight: Weight (weight) */
$handler->display->display_options['sorts']['weight_value']['id'] = 'weight_value';
$handler->display->display_options['sorts']['weight_value']['table'] = 'field_data_weight';
$handler->display->display_options['sorts']['weight_value']['field'] = 'weight_value';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Deal of the week */
$handler->display->display_options['filters']['deal_of_the_week']['id'] = 'deal_of_the_week';
$handler->display->display_options['filters']['deal_of_the_week']['table'] = 'node';
$handler->display->display_options['filters']['deal_of_the_week']['field'] = 'deal_of_the_week';
$handler->display->display_options['filters']['deal_of_the_week']['exposed'] = TRUE;
$handler->display->display_options['filters']['deal_of_the_week']['expose']['operator_id'] = '';
$handler->display->display_options['filters']['deal_of_the_week']['expose']['label'] = 'Deal of the week';
$handler->display->display_options['filters']['deal_of_the_week']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['deal_of_the_week']['expose']['operator'] = 'deal_of_the_week_op';
$handler->display->display_options['filters']['deal_of_the_week']['expose']['identifier'] = 'deal_of_the_week';
$handler->display->display_options['filters']['deal_of_the_week']['expose']['multiple'] = FALSE;
/* Filter criterion: Content: Promoted to front page banner slide */
$handler->display->display_options['filters']['promote_banner_slide']['id'] = 'promote_banner_slide';
$handler->display->display_options['filters']['promote_banner_slide']['table'] = 'node';
$handler->display->display_options['filters']['promote_banner_slide']['field'] = 'promote_banner_slide';
$handler->display->display_options['filters']['promote_banner_slide']['exposed'] = TRUE;
$handler->display->display_options['filters']['promote_banner_slide']['expose']['operator_id'] = '';
$handler->display->display_options['filters']['promote_banner_slide']['expose']['label'] = 'Promoted to front page banner slide';
$handler->display->display_options['filters']['promote_banner_slide']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['promote_banner_slide']['expose']['operator'] = 'promote_banner_slide_op';
$handler->display->display_options['filters']['promote_banner_slide']['expose']['identifier'] = 'promote_banner_slide';
$handler->display->display_options['filters']['promote_banner_slide']['expose']['multiple'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['exposed'] = TRUE;
$handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
$handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
$handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
/* Filter criterion: Content translation: Language */
$handler->display->display_options['filters']['language']['id'] = 'language';
$handler->display->display_options['filters']['language']['table'] = 'node';
$handler->display->display_options['filters']['language']['field'] = 'language';
$handler->display->display_options['filters']['language']['exposed'] = TRUE;
$handler->display->display_options['filters']['language']['expose']['operator_id'] = 'language_op';
$handler->display->display_options['filters']['language']['expose']['label'] = 'Language';
$handler->display->display_options['filters']['language']['expose']['operator'] = 'language_op';
$handler->display->display_options['filters']['language']['expose']['identifier'] = 'language';
$handler->display->display_options['filters']['language']['expose']['reduce'] = 0;

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'weight';
$translatables['weight'] = array(
  t('Master'),
  t('Weight'),
  t('more'),
  t('Apply'),
  t('Reset'),
  t('Sort by'),
  t('Asc'),
  t('Desc'),
  t('Items per page'),
  t('- All -'),
  t('Offset'),
  t('Type'),
  t('Language'),
  t('Deal of the week'),
  t('Promoted to front page banner slide'),
  t('Page'),
);

Right now i've double checked content type and fields and error is gone but weight is not changed

davisben’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks, I'll check it out.

davisben’s picture

I'm unable to reproduce this error. Could you try without any additional fields in the view to see if that works?

dema502’s picture

Status: Active » Postponed (maintainer needs more info)
FileSize
26.33 KB
30.65 KB
94.68 KB
30.93 KB
36.24 KB

ok
look at screenshots i try to debug

and finaly

t1=> SELECT * FROM field_data_weight ;
 entity_type | bundle | deleted | entity_id | revision_id | language | delta | weight_value 
-------------+--------+---------+-----------+-------------+----------+-------+--------------
(0 rows)
dema502’s picture

I've added manualy thougth node edit form

look at screenshots

and result

t1=> SELECT * FROM field_data_weight ;
 entity_type |      bundle      | deleted | entity_id | revision_id | language | delta | weight_value 
-------------+------------------+---------+-----------+-------------+----------+-------+--------------
 node        | eyeglass_display |       0 |      2536 |        2536 | und      |     0 |          -15

Compare 2012-01-26-16.34.12.png (node_load) and 2012-01-26-16.13.58.png (before node_save)

And what about language?

t1=> SELECT translatable FROM field_config WHERE field_name ~ 'weight';
 translatable 
--------------
            0
davisben’s picture

Could you give it a try with the latest dev release? There have been a few fixes related to locale/translation.

davisben’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
Audrius Vaitonis’s picture

Version: 7.x-2.0-beta1 » 7.x-2.0-beta3
Status: Closed (cannot reproduce) » Active

I got the same error, maybe this will be helpful. I am not planning to continue testing, I just choose different module for the job. I also tried dev version but error continued.

my database - postgress,
node with enabled language translations and language.

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "Array" LINE 1: ...S ('node', '71', '102', 'gallery_item', '0', 'und', 'Array') ^: INSERT INTO field_data_weight (entity_type, entity_id, revision_id, bundle, delta, language, weight_value) 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); Array ( ) in field_sql_storage_field_storage_write() (line 448 of /home/audrius/public_html/grants/grants_drupal/modules/field/modules/field_sql_storage/field_sql_storage.module).

arrubiu’s picture

I've the same problem, only with postgres.
A clean installation, I've installed only views, devel and weight, if I try to manage weight from the views I obtain this:

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "Array" LINE 1: ...e) VALUES ('node', '6', '6', 'article', '0', 'und', 'Array') ^: INSERT INTO field_data_weight (entity_type, entity_id, revision_id, bundle, delta, language, weight_value) 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); Array ( ) in field_sql_storage_field_storage_write() (line 448 of /home/sdurzu/workspace/weight/modules/field/modules/field_sql_storage/field_sql_storage.module).

davisben’s picture

Status: Active » Closed (won't fix)

It looks like your using 7.x-2.0-beta3, or earlier, as the field_data_weight table no longer exists. This issue should be resolved in the latest dev release. Please reopen this issue if the error is still present after updating.

arrubiu’s picture

I've upgrade to dev, but if I try to esecute drush updatedb I obtain:

drush updatedb
The following updates are pending:

weight module :
7205 - Set default weights for enabled types.
7206 - Move existing node weights to weight_weights from field_data_weight delete the unneeded weight field.

Do you wish to run all pending updates? (y/n): y
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "weight_weights" does not exist [error]
LINE 3: weight_weights w
^
Finished performing updates.

And now the view is broken

davisben’s picture

I just opened #1509676: Undefined table weight_weights after upgrading from 7.x-2.0-beta3 to work on this issue. It looks like the updates didn't complete running. Could you check the schema_version field for Weight in your system table and reply to the other issue?

1futurevj’s picture

Version: 7.x-2.0-beta3 » 7.x-1.x-dev
Assigned: Unassigned » 1futurevj
Category: bug » support
FileSize
18.48 KB
18.8 KB
Pimmy’s picture

I am not sure if it would help, but I get the same problem with the 'Messages' module:

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "user_8" LINE 4: WHERE (base.uid IN ('user_8')) ^: SELECT base.uid AS uid, base.name AS name, base.pass AS pass, base.mail AS mail, base.theme AS theme, base.signature AS signature, base.signature_format AS signature_format, base.created AS created, base.access AS access, base.login AS login, base.status AS status, base.timezone AS timezone, base.language AS language, base.picture AS picture, base.init AS init, base.data AS data FROM {users} base WHERE (base.uid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => user_8 ) in DrupalDefaultEntityController->load() (line 196 of /var/www/htdocs/includes/entity.inc).

floydwilde’s picture

I get a similar error using the twitter module:

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type numeric: "nimhq" LINE 3: WHERE twitter_uid = 'nimhq' ^: SELECT * FROM {twitter_account} WHERE twitter_uid = :id OR screen_name = :id; Array ( [:id] => nimhq ) in twitter_account_load() (line 82 of /home/john/public/sites/all/modules/twitter/twitter.inc).

Seems to be something with Postgres data types. I've opened a bug for twitter module and supplied some links to other bugs I've found with similar messages:

https://drupal.org/node/1985708