Skip to content

SQL error when flagging and unflagging Content Entities #192

@left23

Description

@left23

When I tried to flag a mission with "Mission Complete" (as Player, not admin) Eg. /mission/210-main-mission-mine-some-crystals
I get this in the console

http://192.168.178.206/flag/flag/mission_completed/616?destination=/mission/210-main-mission-mine-some-crystals&token=rw2nWcHMr_FCRiLyaenuY_P572u1IMwh6SDdCrP9GWw&_wrapper_format=drupal_ajax
Drupal\Core\Entity\EntityStorageException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2: SELECT node__field_switches.field_switches_target_id FROM node__field_switches WHERE node__field_switches.entity_id =; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Paragraph flags work fine. I understand Player role is not supposed to flag the Mission Complete in this way (via the frontend "unflag" button), but I enabled it for ease of testing as I am trying to construct Views.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions