Problem/Motivation

Upon visiting /admin/content-planner/dashboard I get the following error: "Error: Call to undefined method Drupal\content_kanban\Plugin\DashboardBlock\RecentKanbanActivities::t() in Drupal\content_kanban\Plugin\DashboardBlock\RecentKanbanActivities->composeMessage() (line 196 of modules/contrib/content_planner/modules/content_kanban/src/Plugin/DashboardBlock/RecentKanbanActivities.php)."

The issue is caused by the use of "$this->t(" in RecentKanbanActivities class, because StringTranslationTrait isn't imported.

Proposed resolution

Similar to how a few other contrib modules solved this issue, I propose using StringTranslationTrait to avoid this issue.

CommentFileSizeAuthor
fix-undefined-method-t.patch924 bytesjosip.rajkovic

Comments

josip.rajkovic created an issue. See original summary.

avpaderno’s picture

Version: 8.x-1.0-beta17 » 8.x-1.x-dev
Status: Active » Needs review

  • DieterHolvoet committed 6b6f528 on 8.x-1.x
    Issue #3314750 by josip.rajkovic: Call to undefined method Drupal\...
dieterholvoet’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.