notum-cz / strapi-plugin-content-versioning

This plugin enables content versioning in Strapi
129 stars 46 forks source link

Error updating Content Manager Collection Types with Postgresql Connection #179

Closed steffolino closed 9 months ago

steffolino commented 9 months ago

Bug report

Describe the bug

Internal Server error when having Content Version Plugin activated and trying to update a Collection Type

Steps to reproduce the behavior

  1. Setup strapi with a postgres connection
  2. Download and acvtivate Content Versioning Plugin
  3. Create generic collection type (i only had one property called title)
  4. Update said Collection Type

Expected behavior

Update Collection Type

Screenshots

If applicable, add screenshots to help explain your problem.

Code snippets

Output: [2024-02-08 10:04:39.801] http: POST /content-manager/collection-types/api::film-work.film-work/1/actions/publish (1340 ms) 200 [2024-02-08 10:04:51.110] error: SELECT a.id, a.version_number, a.published_at FROM film_works a WHERE NOT EXISTS ( SELECT 1 FROM film_works WHERE vuid=a.vuid AND ( CASE WHEN a.published_at is null THEN ( published_at is not null OR version_number > a.version_number ) ELSE published_at is not null AND version_number > a.version_number END ) ) AND vuid = '3ee899e4-2857-407a-bfef-dc4db534c1e6' - relation "film_works" does not exist error: SELECT a.id, a.version_number, a.published_at FROM film_works a WHERE NOT EXISTS ( SELECT 1 FROM film_works WHERE vuid=a.vuid AND ( CASE WHEN a.published_at is null THEN ( published_at is not null OR version_number > a.version_number ) ELSE published_at is not null AND version_number > a.version_number END ) ) AND vuid = '3ee899e4-2857-407a-bfef-dc4db534c1e6' - relation "film_works" does not exist at Parser.parseErrorMessage (C:\Users\StretzS\projects\avefi_proto\node_modules\pg-protocol\dist\parser.js:287:98)
at Parser.handlePacket (C:\Users\StretzS\projects\avefi_proto\node_modules\pg-protocol\dist\parser.js:126:29)
at Parser.parse (C:\Users\StretzS\projects\avefi_proto\node_modules\pg-protocol\dist\parser.js:39:38) at Socket. (C:\Users\StretzS\projects\avefi_proto\node_modules\pg-protocol\dist\index.js:11:42) at Socket.emit (node:events:514:28) at Socket.emit (node:domain:488:12) at addChunk (node:internal/streams/readable:376:12) at readableAddChunk (node:internal/streams/readable:349:9) at Readable.push (node:internal/streams/readable:286:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

System

Additional context

Can be fixed by setting the schema before executing update statement or fully qualify table including the schema

steffolino commented 9 months ago

Sorry for the inconvenience, seems to have been a known strapi issue: https://github.com/strapi/strapi/issues/17672