Problem/Motivation

I'm getting the following error with latest flag 8.x-4.0-beta6 and flag_block:

"Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "view_mode" for route "flag.action_link_flag" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 209 of core/lib/Drupal/Core/Routing/UrlGenerator.php). "

See Change Record for Flag 8.x-4.0-beta6: https://www.drupal.org/node/3458551

CommentFileSizeAuthor
#2 3515138-flag-beta6-compat-2.patch560 bytesbaysaa

Issue fork flag_block-3515138

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

baysaa created an issue. See original summary.

baysaa’s picture

StatusFileSize
new560 bytes

Patch attached.

malcomio made their first commit to this issue’s fork.

malcomio’s picture

Status: Active » Needs review
Related issues: +#2959952: Ajax link flag does not work in view with ajax enabled.

Thanks for sharing the patch - a merge request would be good - see https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr...

Also, if this needs to be reviewed by the maintainers, then the status should be "Needs Review" - see https://www.drupal.org/docs/develop/issues/fields-and-other-parts-of-an-...

I found this issue after investigating #2959952: Ajax link flag does not work in view with ajax enabled. - will test whether the patch solves our problem.

malcomio’s picture

Status: Needs review » Reviewed & tested by the community

The patch fixes the issue for us.

yannickoo’s picture

I can agree that MR works as expected 👌

yannickoo’s picture

FYI I have created another MR over in #3564377: Make view mode configurable to make the view mode configurable. That can be helpful to use another template for the flag link for different blocks.

baysaa’s picture

malcomio’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

#3564377: Make view mode configurable has been included in 2.0.1

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.