Error on call to FormattableMarkup() and Drupal::service('path.alias_manager.cached')

Created on 9 December 2020, about 4 years ago
Updated 20 May 2024, 7 months ago

Problem/Motivation

These two errors (both in beautytips_manager.module) are logged:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "path.alias_manager.cached". Did you mean this: "path.alias_manager"?

Line 214: ArgumentCountError: Too few arguments to function Drupal\Component\Render\FormattableMarkup::__construct(), 1 passed

Steps to reproduce

Install module, add a new Custom Tip. Assign it to only render on a certain page. The code with the call to Drupal::service('path.alias_manager.cached') is only executed when a tip is defined to be limited to certain pages.

Proposed resolution

I have the start of a patch attached.

Remaining tasks

The code to match the path of the tooltip isn't quite right yet. This patch does get it to function for tooltips not specifying a path.

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇺🇸United States pamelalies Minneapolis area

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024