PostgreSQL: views flag relationship error

Created on 16 December 2024, 6 days ago

Problem/Motivation

Using PostgreSQL as DB backend there is the next error adding flag relationship to a view:

SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: bigint = character varying LINE 4: INNER JOIN "flagging" "flagging_taxonomy_term_field_data" ON taxonomy_term_field_data.tid = flagging_taxonomy_term_field_data.entity_id

Proposed resolution

Cast entity id to string

Remaining tasks

Didn't checked reversed case: content relationship in view based on flaggings.

🐛 Bug report
Status

Active

Version

4.0

Component

Views integration

Created by

🇧🇾Belarus dewalt

Live updates comments and jobs are added and updated live.
  • PostgreSQL

    Particularly affects sites running on the PostgreSQL database.

Sign in to follow issues

Comments & Activities

  • Issue created by @dewalt
  • 🇧🇾Belarus dewalt

    Here is a patch that solves the issue, it works with MySQL too, but I didn't checked if it has any affect on performance.

Production build 0.71.5 2024