I just did a pretty basic fresh install and I'm getting this error on nodes and profile2s. Comments work fine.

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "1.json" LINE 5: WHERE (base.nid IN ('1.json')) ^: SELECT revision.vid AS vid, base.uid AS uid, revision.title AS title, revision.log AS log, revision.status AS status, revision.comment AS comment, revision.promote AS promote, revision.sticky AS sticky, base.nid AS nid, base.type AS type, base.language AS language, base.created AS created, base.changed AS changed, base.tnid AS tnid, base.translate AS translate, revision.timestamp AS revision_timestamp, revision.uid AS revision_uid FROM {node} base INNER JOIN {node_revision} revision ON revision.vid = base.vid WHERE (base.nid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 1.json ) in DrupalDefaultEntityController->load() (line 196 of /drupal/includes/entity.inc).

Installed contrib modules with default settings:

  • Administration menu
  • Administration Development tools
  • Chaos tools
  • Devel
  • Devel generate
  • Devel node access
  • Address Field
  • Advanced help
  • Entity API
  • Profile2
  • Profile2 pages
  • And of course RESTful web services

Database is PostgreSQL 9.1

I've set the correct user access permissions.

Comments

hernangomez’s picture

I have the same problem with my PostgreSQL installation.

May i'm wrong, but i think there's an error on the SQL query because in the WHERE parameter instead of take the nid (1) it use the url parameter (1.son).
This [:db_condition_placeholder_0] => 1.json should be [:db_condition_placeholder_0] => 1

hernangomez’s picture

Version: 7.x-1.x-dev » 7.x-2.0-alpha2
klausi’s picture

Status: Active » Closed (duplicate)

I think this is a duplicate of #1003788: PostgreSQL: PDOException:Invalid text representation when attempting to load an entity with a string or non-scalar ID.

Using the format extension like ".json" or ".xml" is not recommended anyway - use the accept headers when possible.

klausi’s picture

Issue summary: View changes

Remove unused contrib modules from list.