Closed (fixed)
Project:
Flag Lists
Version:
4.0.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
19 Oct 2023 at 05:43 UTC
Updated:
19 Dec 2023 at 10:09 UTC
Jump to comment: Most recent, Most recent file
While unflagging a node following error is thrown:
TypeError: Drupal\flag_lists\EventSubscriber\FlagForListSubscriber::flagListsEntityUnflagged(): Argument #1 ($flag_events) must be of type Symfony\Component\EventDispatcher\Event, Drupal\flag\Event\UnflaggingEvent given in Drupal\flag_lists\EventSubscriber\FlagForListSubscriber->flagListsEntityUnflagged() (line 57 of /app/public/modules/contrib/flag_lists/src/EventSubscriber/FlagForListSubscriber.php).
Environment: Drupal 10
Change expected argument types to FlaggingEvent and UnflaggingEvent in corresponding methods.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | unflagging-event-error-3395071-2.patch | 1.64 KB | jviitamaki |
Comments
Comment #2
jviitamaki commentedComment #3
sl27257Hi,
thanks for the report!
I am a sort of aware of this problem. It is mentioned in the release note for flag_lists 4.0.0-rc3 where it is listed as a dependency to the flag module. So if I understand this correctly it will break sooner or later and require a fix in the flag module.
But that said, your patch is is a great way to get away from the flag module dependency!
Thanks!
Comment #5
sl27257Comment #6
sl27257