Problem/Motivation
opigno_learning_path\LearningPathAccess has code like the following:
$token = \Drupal::moduleHandler()->moduleExists('token') ? TRUE : FALSE;
LearningPathAccess::notifyUsersByMail($group, $uid, $status, $token);
...
public static function replaceGroupUserTokens(&$text, $params, $token) {
if ($token) {
$text = \Drupal::token()->replace($text);
However, Drupal::token() is always available with Drupal core. Token module in contrib only provides additional tokens and the browser UI.
Steps to reproduce
Proposed resolution
Always call Drupal::token()->replace() and remove the moduleExists() checks
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
dipayanpramanik5 commentedComment #3
dipayanpramanik5 commentedComment #4
axelmHi
Thanks for reporting this and suggesting some patch,
We will include a fix in the next Opigno release.
Comment #5
axelmComment #6
axelmReleased in Opigno 3.1.0
Comment #7
axelmComment #8
axelm