- Issue created by @leisurman
- Assigned to samit.310@gmail.com
- Status changed to Needs work
almost 2 years ago 2:35pm 14 June 2023 - Issue was unassigned.
- Status changed to Postponed: needs info
almost 2 years ago 2:41pm 14 June 2023 - 🇮🇳India samit.310@gmail.com
Hi @leisurman ,
I checked it, but not able to reproduce it at my end, As per error tracing another contrib module message_subscribe is also there. Not sure but it might be because of it.
#9 /var/www/html/ehss_stage/web/modules/contrib/message_subscribe/message_subscribe_email/message_subscribe_email.module(24): Drupal\flag\FlagService->getAllEntityFlaggings()
Can you please share more detail steps to reproduce it?
Thanks
Samit K. - 🇩🇪Germany joooo_aah Bavaria
Same here when creating new user (user has computed string field which sums up the flags). Variable $string is a big array/object
TypeError: addcslashes(): Argument #1 ($string) must be of type string, Drupal\Core\Session\AccountProxy given in addcslashes() (line 1525 of core/lib/Drupal/Core/Database/Connection.php).
addcslashes() (Line: 1525)
Drupal\Core\Database\Connection->escapeLike() (Line: 431)
Drupal\Core\Database\Query\Select->escapeLike() (Line: 125)
Drupal\Core\Entity\Query\Sql\Condition::translateCondition() (Line: 70)
Drupal\Core\Entity\Query\Sql\Condition->compile() (Line: 177)
Drupal\Core\Entity\Query\Sql\Query->compile() (Line: 81)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 203)
Drupal\flag\FlagService->getEntityFlaggings() (Line: 96)
Drupal\flag\FlagService->getFlagging() (Line: 115)Using Flag 4.0@beta, and Drupal core 9.5.8
- Status changed to Closed: works as designed
over 1 year ago 2:58pm 19 December 2023 - 🇨🇦Canada joel_osc
Ran into this exact issue and it was as a result of the message_subscribe module... grabbing the latest dev version of it fixed the problem. This line here: #9 /var/www/html/ehss_stage/web/modules/contrib/message_subscribe/message_subscribe_email/message_subscribe_email.module(24): Drupal\flag\FlagService->getAllEntityFlaggings() in the stack trace indicates this as well. Basically the message_subscribe_email code was not checking whether or not the $flagging entity was complete before trying to get all flaggings, so on a new node you would get this error. The maintainers has since added a check for $flagging->id() before getAllEntityFlaggings() now which prevents the issue.