load flags in bulk in flag_form_save()

Created on 24 March 2017, over 8 years ago
Updated 20 August 2025, 5 days ago
  foreach ($values as $flag_id => $value) {
    // Get the flag from the Flag Service.
    $flag = $flag_service->getFlagById($flag_id);

The flags should be loaded in bulk outside of the loop.

Postponed on #2764399: The user has already flagged the entity with the flag on editing flagged node .

📌 Task
Status

Fixed

Version

4.0

Component

Flag core

Created by

🇬🇧United Kingdom joachim

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