Closed (fixed)
Project:
Flag
Version:
8.x-4.0-beta2
Component:
Views integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2020 at 16:51 UTC
Updated:
4 Aug 2022 at 22:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Julia Mykhaliak commentedIt happens to me after adding relationship 'Content flag' on view, then after reloading view I am getting error
Flag 8.x-4.0-beta2, Drupal 8.8.5
Warning: assert(): Cannot load the "flag" entity with NULL ID. failed in /var/www/drupal/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php on line 249Warning: array_flip(): Can only flip STRING and INTEGER values! in /var/www/drupal/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php on line 266Comment #3
Julia Mykhaliak commentedComment #4
phernand42 commentedComment #5
ptmkenny commented@Julia Mykhaliak Please check the Drupal.org issue status descriptions. "Active" is for issues that don't have a patch; "Needs work" is for issues that do have a patch. This issue has no patch, so it is active.
Comment #6
arun_kv commentedI get the same issue when I use flag on contact messages. I am not using VBO module.
Comment #7
nejcramsak commentedHi, i added a check that fixes this warning. Needs review.
Comment #8
brandonratz commentedIn my case this happened after having an existing Flag relationship in the View. After adding a new Flag entity I received this warning.
Patch #7 fixed error
Comment #9
michelleI am having this issue and the patch didn't help. In my case, the action works when it's done from admin/content. It gets the error when done from a custom view of Publication type nodes. I also have a notice right before the error that isn't shown in the OP:
I put a breakpoint in at the line for the notice and the stack is very different between where it works and where it doesn't and the config is coming up empty. I'm not sure where to go from here in debugging. Any ideas?
Working:

Not working:

Comment #10
jurgenhaasWe are currently facing the same issue with the ECA module, see #3268552: Flag action isn't compatible with ECA
What we do over there is the create a list of all available actions through the action plugin manager form Drupal core. The problem seems to be that the flag module only registers 2 actions through it deriver. Instead, I think the deriver should register 2 actions for each configured flag config entity. That way, everybody could operate with those actions by having access to all of the configuration for each of them.
There is also an issue that's about integrating the flag module with ECA, so it looks there is real interest in getting this fixed. See #3238783: Integrate with ECA
Comment #11
delacosta456 commentedhi
Patch #7 worked for me too with distro Open social 11.05 (D9.2)
Thanks
Comment #12
dries arnoldsI ran into this issue today. In my opinion integration with other modules is the core of what Flag is useful for, so this is probably important.
Comment #14
berdir#9 that's a similar error in a different class, this is about views relationship.