Cannot add users/classes to Learning Path

Created on 10 May 2023, over 1 year ago
Updated 3 November 2023, about 1 year ago

Problem/Motivation

When I start typing the name of a user or a class nothing shows on the autocomplete or in the list below the textbox.
I installed a fresh Instance of Opigno and I got the exact same result. This also happens on the Opigno oficial demo.

Steps to reproduce

  • Go to /group/{{learning_path_id}}/content/add/group_membership
  • Try to add or create a class
  • The autocomplete doesn't return results.
  • When you try to create a Class using the widget the form submits but it doesn't list the new class. The class is not created.
🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇨🇦Canada adancillo

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

Comments & Activities

  • Issue created by @adancillo
  • 🇫🇷France romainj

    I have the same error with version 3.1.0:

    LogicException: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\Core\Cache\CacheableJsonResponse. in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (line 154 of /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php).

    This comes from the controller response:

    opigno_learning_path/modules/opigno_user_selection/src/Controller/OpignoUserSelectionController.php

    $response = new CacheableJsonResponse($response_data);
    $response->addCacheableDependency($meta);

    I'm not sure what to do here to return a proper cacheable json response.

Production build 0.71.5 2024