Problem/Motivation
Unflagging with the flag setting "Field entry form" (with a field attached to the flag entity) throws the following error message:
LogicException: The entity is not flagged by the user. in Drupal\flag\FlagService->unflag() (line 340 of /var/www/.../modules/contrib/flag/src/FlagService.php).
Steps to reproduce
1. Create a global flag
2. Create a field on the flag entity (e.g. a date field)
3. Set the display options:
3.1. Display link as field, Display in contextual links
3.2. Display in entity links: check Full content, Teaser view mode
3.3. Link type: Field entry form (setting a field value works only with this option)
4. Form behaviour: modal dialog or dialog
5. Save flag
6. Flagging is ok.
7. While clicking on unflagging the field entry pops up in a modal window.
7.1. You are allowed to modify / edit the field value.
--- However:
7.2. If you choose "unflag this" you are:
7.2.1. Moved from the modal and redirected to a new "unflag this" page (outside the modal). If you confirm again to unflag on this page:
7.2.2. You are redirected again to the same "unflag this" page.
7.2.3. If you don't abort the process, the system will throw the php error above.
Comments
Comment #2
deaom commentedCould not reproduce in 5.x., so assuming this was corrected with the new version of Flag.
Comment #3
ivnishI tested this manually using steps to reproduce from issue summary. Everything is working as expected. Closing this as "cannot reproduce'