Hello, I just tried to install the module on a Drupal 8 websites using a PostGreSQL database (with a custom schema).
I was surprised to see the following message :

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "1501739063.4951" LINE 1: ...S ('VYrFj5wFb1aBSZMyb4rxLTBbaMJC2Xyp2ghC1xBuylI', '150173906... ^: INSERT INTO georep.cache_advagg (cid, expire, created, tags, checksum, data, serialized) 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) ON CONFLICT (cid) DO UPDATE SET cid = EXCLUDED.cid, expire = EXCLUDED.expire, created = EXCLUDED.created, tags = EXCLUDED.tags, checksum = EXCLUDED.checksum, data = EXCLUDED.data, serialized = EXCLUDED.serialized; Array ( ) in Drupal\advagg\Asset\AssetOptimizer->scanFile() (line 227 of modules/contrib/advagg/src/Asset/AssetOptimizer.php).

Did anyone already encountered this ? Does anyone has a potential solution ?
Thanks

Comments

Renrhaf created an issue. See original summary.

NickDickinsonWilde’s picture

Assigned: Unassigned » NickDickinsonWilde
Status: Active » Needs work

Ah looks like a float vs int. Investigating, thanks.

  • NickWilde committed 56ac770 on 8.x-3.x
    Issue #2897744 by NickWilde: Invalid text representation - PostgreSQL
    
NickDickinsonWilde’s picture

Version: 8.x-3.0 » 8.x-3.x-dev
Assigned: NickDickinsonWilde » Unassigned
Status: Needs work » Fixed

So apparently, MySQL automatically converts float->int whereas Postgre doesn't.
Fixed the cache function to always (properly) use ints - committed to dev, re-open if still an issue.
Thanks again for the report :)

Renrhaf’s picture

Hello NickWilde, thanks for the fix, I'll give it a try soon !

Status: Fixed » Closed (fixed)

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

Naibin’s picture

The website encountered an unexpected error. Please try again later.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type bigint: "contact" LINE 5: WHERE "group_content_field_data"."entity_id" = 'contact' ^: SELECT "base_table"."id" AS "id", "base_table"."id" AS "base_table_id" FROM {group_content} "base_table" INNER JOIN {group_content_field_data} "group_content_field_data" ON [group_content_field_data].[id] = [base_table].[id] WHERE "group_content_field_data"."entity_id" = :db_condition_placeholder_0; Array ( [:db_condition_placeholder_0] => contact ) in Drupal\webform_group\WebformGroupManager->getCurrentGroupContent() (line 166 of modules/webform/modules/webform_group/src/WebformGroupManager.php).
Drupal\Core\Database\StatementWrapper->execute() (Line: 823)
Drupal\Core\Database\Connection->query() (Line: 195)
Drupal\Core\Database\Driver\pgsql\Connection->query() (Line: 510)
Drupal\Core\Database\Query\Select->execute() (Line: 145)
Drupal\Core\Database\Driver\pgsql\Select->execute() (Line: 267)
Drupal\Core\Entity\Query\Sql\Query->result() (Line: 83)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 166)
Drupal\webform_group\WebformGroupManager->getCurrentGroupContent() (Line: 140)
Drupal\webform_group\WebformGroupManager->getCurrentUserGroupRoles() (Line: 309)
webform_group_webform_access()
call_user_func_array() (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 97)
Drupal\Core\Entity\EntityAccessControlHandler->access() (Line: 314)
Drupal\Core\Entity\EntityBase->access() (Line: 65)
Drupal\Core\Entity\EntityAccessCheck->access()
call_user_func_array() (Line: 64)
Drupal\webprofiler\Access\AccessManagerWrapper->performCheck() (Line: 51)
Drupal\webprofiler\Access\AccessManagerWrapper->check() (Line: 112)
Drupal\Core\Access\AccessManager->checkRequest() (Line: 109)
Drupal\Core\Routing\AccessAwareRouter->checkAccess() (Line: 94)
Drupal\Core\Routing\AccessAwareRouter->matchRequest() (Line: 112)
Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest() (Line: 79)
Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher->dispatch() (Line: 134)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 57)
Drupal\Core\StackMiddleware\Session->handle() (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 38)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->handle() (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 706)
Drupal\Core\DrupalKernel->handle() (Line: 19)

I was using postgresql and drupal9.0.8.
I was experiencing same error.