Closed (fixed)
Project:
Pathauto
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2021 at 08:38 UTC
Updated:
23 Mar 2022 at 19:14 UTC
Jump to comment: Most recent
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.
Replace $this->translationManager->formatPlural() with $this->formatPlural() since that is the method that is added by the StringTranslationTrait.
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
Comment #3
jeroentComment #4
jeroentComment #7
berdirMakes sense.