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?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1302158-workaround-for-core-bug-1302158.patch | 1.02 KB | dave reid |
Comments
Comment #1
dave reidThis 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.
Comment #2
dave reidActually we can and should work around this temporarily.
Comment #3
dave reidPlease test the following patch.
Comment #4
dave reidTested 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
Comment #5
chrissearle commentedInstalled 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).Comment #6
dave reidI can't say that error is actually related to Pathauto.
Comment #7
chrissearle commentedHmm - I don't get it if I uncheck auto alias checkbox and specify manually.
Comment #8
chrissearle commentedBit 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%'))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.
Comment #9
chrissearle commentedOK - 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.
Comment #10
chrissearle commentedCore bug patch works for me - will comment (and also removes the weird transaction exception).