Trying to create a path to redirect from a taxonomy term (core/team, core/result, core/info etc) to a view.

Select the core taxonomy for instance.

Set the path core/[term:tid] as path pattern.

No query or fragment.

Hit save - and I get:

PDOException: SQLSTATE[22003]: Numeric value out of range: 7 ERROR: setval: value 0 is out of bounds for sequence "entity_path_config_cid_seq" (1..9223372036854775807): SELECT setval('entity_path_config_cid_seq', GREATEST(MAX(cid), :serial_value)) FROM {entity_path_config}; Array ( [:serial_value] => 0 ) i drupal_write_record() (linje 6888 av /srv/www/hostname/htdocs/includes/common.inc).

Am running against postgresql - so could be postgres specific issue.

Any ideas how to move forward?

Comments

derhasi’s picture

This very likely looks like a postgresql issue. The query is build in includes/database/pgsql.inc (line 63), where no default value leeds to 0, and so to a not accepted cid.

Maybe the attached patch may resolve the issue. (after running update.php) But it could also be a ctools issues.

chrissearle, can you test the patch and give some feedback. I've no pqsql running.

derhasi’s picture

Issue tags: +PostgreSQL
StatusFileSize
new999 bytes

...arg .. here's the patch:

chrissearle’s picture

Hadn't spotted this before today - sorry. Will try to take a look either tomorrow or early next week.

derhasi’s picture

Status: Active » Postponed (maintainer needs more info)
derhasi’s picture

Title: PDO exception when trying to add » PDO exception when trying to add [postgresql]
Status: Postponed (maintainer needs more info) » Needs review

chrissearle, did you get it running or could you test it against a postgresql DB?

chrissearle’s picture

Hmm

Applied the patch

I get the same error as before:

PDOException: SQLSTATE[22003]: Numeric value out of range: 7 ERROR: setval: value 0 is out of bounds for sequence "entity_path_config_cid_seq" (1..9223372036854775807): SELECT setval('entity_path_config_cid_seq', GREATEST(MAX(cid), :serial_value)) FROM {entity_path_config}; Array ( [:serial_value] => 0 ) i drupal_write_record() (linje 7036 av /srv/www/hostname/htdocs/includes/common.inc).

I noticed that the patch also had a db migration in so I ran update - that gives:

Failed: PDOException: SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "entity_path_config_cid_seq" already exists: CREATE SEQUENCE {entity_path_config}_cid_seq; Array ( ) i db_change_field() (linje 2988 av /srv/www/hostname/htdocs/includes/database/database.inc).

derhasi’s picture

Status: Needs review » Needs work

There was a similar bug in ECK: #1512474: PDOException on PostgreSQL.

Might be a ctools problem on the 'serial' field.

derhasi’s picture

Status: Needs work » Needs review

@chrissearle, can you check the attached patched (apply and clear caches - multiple times maybe)?

A similar issue from ctools: #1516356: My export object include the primary key which is a serial number

derhasi’s picture

StatusFileSize
new622 bytes

there's the patch ;)

RealGecko’s picture

Issue summary: View changes

Patch from #2 worked for me, from #9 failed :)