Problem/Motivation

Advanced text formatter call a non exisiting method
\Drupal::messenger()->addNotice when using php filter to warn user and causes a PHP error

Proposed resolution

replace addNotice by addWarning ? here is a patch that does that

Comments

Thony created an issue. See original summary.

carsteng’s picture

Status: Active » Needs work

Do not call \Drupal ...

INstead use $this->messenger()->addWarning()

opi’s picture

Here is a proper patch using $this->messenger()->addWarning method

opi’s picture

Status: Needs work » Needs review
bohus ulrych’s picture

Thanks. This patch works - advanced_text_formatter 2.1.0 & Drupal 9.2.4

carsteng’s picture

Status: Needs review » Reviewed & tested by the community
rajab natshah’s picture

Tested #3 in Drupal 8 and Drupal 9
Working ... Thank you :)

  • azovsky committed b25a425 on 2.1.x
    Issue #3231760 by opi: addNotice Method does not exist
    
azovsky’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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