I have the current settings:

Default path pattern: [node:title]
Pattern for all Blog entry paths: blog/[node:taxonomy_vocabulary_3]/[node:title]

I can save any type other than blog. Saving a blog entry gives me (with a tag of test_tag):

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "test_tag": 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] => test_tag ) in DrupalDefaultEntityController->load() (line 196 of /srv/www/www.chrissearle.org/htdocs/includes/entity.inc).

Tried changing the pattern to:

Pattern for all Blog entry paths: blog/foo/[node:title]

This gives

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "foo": 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] => foo ) in DrupalDefaultEntityController->load() (line 196 of /srv/www/www.chrissearle.org/htdocs/includes/entity.inc).

So - I note that if I have blog/<something here>/[node:title] then I get an ERROR: invalid input syntax for integer: "<something here>" - doesn't matter if its a token or a string.

Am I missing something obvious here?

Comments

dave reid’s picture

Status: Active » Closed (duplicate)

This is a duplicate of the core bug #1003788: PostgreSQL: PDOException:Invalid text representation when attempting to load an entity with a string or non-scalar ID. It would be good if you could go help review that core patch and get it fixed in Drupal 7.9.

dave reid’s picture

Version: 7.x-1.0-rc2 » 7.x-1.x-dev
Assigned: Unassigned » dave reid
Status: Closed (duplicate) » Active

Actually we can and should work around this temporarily.

dave reid’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.02 KB

Please test the following patch.

dave reid’s picture

Status: Needs review » Fixed

Tested and confirmed this should temporarily fix the problem. Committed #3 to 7.x-1.x. Please be sure to also review the core issue #1003788: PostgreSQL: PDOException:Invalid text representation when attempting to load an entity with a string or non-scalar ID.
http://drupalcode.org/project/pathauto.git/commit/6c878d5

chrissearle’s picture

Installed the new 7.x-1.x-dev and tried to save a post.

I now see:

PDOException: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block: SELECT column_name, data_type, column_default FROM information_schema.columns WHERE table_schema = :schema AND table_name = :table AND (data_type = 'bytea' OR (numeric_precision IS NOT NULL AND column_default LIKE :default)); Array ( [:schema] => public [:table] => url_alias [:default] => %nextval% ) in drupal_write_record() (line 6868 of /srv/www/www.chrissearle.org/htdocs/includes/common.inc).

dave reid’s picture

I can't say that error is actually related to Pathauto.

chrissearle’s picture

Hmm - I don't get it if I uncheck auto alias checkbox and specify manually.

chrissearle’s picture

Bit strange - 'cos if I actually run it manually:

SELECT column_name, data_type, column_default FROM information_schema.columns WHERE table_schema = 'public' AND table_name = 'url_alias' AND (data_type = 'bytea' OR (numeric_precision IS NOT NULL AND column_default LIKE '%nextval%'))

column_name     data_type     column_default
pid             integer       nextval('url_alias_pid_seq'::regclass)

But I've not dived into postgres schema's yet - migrating my own blog over is more of a learning exercise than anything ;) I'll keep an eye on it.

chrissearle’s picture

OK - ref #5 - #8 here - googling suggests it's a symptom of an already failed transaction rather than the actual error - I'll have to do some more testing/increased query logging I think.

So don't worry about that error too much until I can show one way or the other if it's related to pathauto or not.

Just spotted this one too - http://www.chrissearle.org/blog/add_address_book_support_for_sonyericsso... - I suspect that this is related to the same core bug - so I'll have to do some more testing there too.

chrissearle’s picture

Core bug patch works for me - will comment (and also removes the weird transaction exception).

Status: Fixed » Closed (fixed)

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