Skip to content

Cannot get stats #440

Description

@Artdue

Describe the bug
In console code 500
message: "Http failure response for https://{domain}/api/v1/projects/{projectId}/stats: 500 Internal Server Error"
In docker logs:
QueryFailedError: missing FROM-clause entry for table "projectlocale"
at PostgresQueryRunner.query (/opt/traduora/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SelectQueryBuilder.execute (/opt/traduora/node_modules/typeorm/query-builder/QueryBuilder.js:273:20) {
query: SELECT projectLocale.localeCode AS "localeCode", count(*) AS "translated" FROM "project_locale" "projectLocale" LEFT JOIN "translation" "translations" ON "translations"."project_locale_id"="projectLocale"."id" WHERE "projectLocale"."id" IN ($1, $2) AND "translations"."value" <> '' GROUP BY localeCode,
parameters: [
'---',
'---'
],
driverError: error: missing FROM-clause entry for table "projectlocale"
at /opt/traduora/node_modules/pg/lib/client.js:535:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PostgresQueryRunner.query (/opt/traduora/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25)

So it's kind of naming issue, stats won't load and export doesn't work
Tried to rename tables/columns, but new errors appear

To Reproduce
Steps to reproduce the behavior:

It's happening from the moment I choose project

Expected behavior
To see stats on the left, under the project name

Screenshots
If applicable, add screenshots to help explain your problem.

** Environment (please complete the following information):**

  • Device: Desctop
  • OS: Ubuntu
  • Browser: Chrome
  • Version: 119.0.6045.124
    App was deployed according to documentation, only config was adjusted
    Using postgres db
    Auth goes fine, but when project is chosen, i

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions