make the related_flag id unique

Created on 27 February 2021, over 3 years ago
Updated 17 May 2023, over 1 year ago

Problem/Motivation

In case of per user managed flag_lists, mutliple flags with the same id may (will) be created, which breaks the admi/structure/flag page

NOTICE: PHP message: [error] [php] [192.168.64.1] [uid:1] [http://dev.materio.com/fr/admin/structure/flags] [http://dev.materio.com/fr/admin/structure/flag_lists/flag_list_item] Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "flagging_collection" for route "entity.flagging_collection.canonical" must match "\d+" ("177|197|213" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 204 of /var/www/html/d8.materio.com/public_html/web/core/lib/Drupal/Core/Routing/UrlGenerator.php).

Proposed resolution

on flag_lists flagging_collection creation, make the related_flag id unique.

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡«πŸ‡·France bachbach Le Havre

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024