Techbot / JiGS-RPG-engine

Open Source Php/NodeJs Online RPG and Trading Game Engine
https://www.eclecticmeme.com
GNU General Public License v3.0
73 stars 20 forks source link

SQL error when flagging and unflagging Content Entities #192

Closed left23 closed 3 months ago

left23 commented 3 months ago

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.