Problem/Motivation

The warning is about the following piece of code:

    if (!empty($options['message'])) {
      $this->messenger->addMessage($this->translationManager
        ->formatPlural(count($ids), 'Updated 1 %label URL alias.', 'Updated @count %label URL aliases.'), [
          '%label' => $this->getLabel(),
        ]);
    }

The translationManager service is set in StringTranslationTrait, the service is only available when getStringTranslation method is called.

Proposed resolution

Replace $this->translationManager->formatPlural() with $this->formatPlural() since that is the method that is added by the StringTranslationTrait.

Issue fork pathauto-3248142

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

JeroenT created an issue. See original summary.

jeroent’s picture

Issue summary: View changes
jeroent’s picture

Status: Active » Needs review

Berdir made their first commit to this issue’s fork.

  • Berdir committed bbe3ee2 on 8.x-1.x authored by JeroenT
    Issue #3248142 by JeroenT: EntityAliasTypeBase plugin gives the...
berdir’s picture

Status: Needs review » Fixed

Makes sense.

Status: Fixed » Closed (fixed)

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