Problem/Motivation

When trying to open a print link in combination with the fixed path alias module (https://www.drupal.org/project/fixed_path_alias), the following error occurs:
TypeError: Argument 3 passed to Drupal\printable\LinkExtractor\InlineLinkExtractor::__construct() must be an instance of Drupal\path_alias\AliasManager, instance of Drupal\fixed_path_alias\FixedPathAliasManager given, called in /core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\printable\LinkExtractor\InlineLinkExtractor->__construct() (line 39 of modules/contrib/printable/src/LinkExtractor/InlineLinkExtractor.php).

Steps to reproduce

Install both the printable and fixed_path_alias module and click a print link.

Proposed resolution

Instead of using AliasManager object, use AliasManagerInterface.

Remaining tasks

Check fix.

User interface changes

-

API changes

-

Data model changes

Use interface

Issue fork printable-3194744

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

JohanKleene created an issue. See original summary.

johankleene’s picture

StatusFileSize
new1.12 KB
bluegeek9’s picture

Title: InlineLinkExtractor type error » AliasManagerInterface InlineLinkExtractor::__construct()
Status: Active » Reviewed & tested by the community
bluegeek9’s picture

StatusFileSize
new1.17 KB

This patch is the same as JohanKleene submited, but with a different working directory

diff --git a/printable/src
to
diff --git a/src

Nigel Cunningham made their first commit to this issue’s fork.

nigelcunningham’s picture

Status: Reviewed & tested by the community » Fixed

Rebased and merged into 3.x branch.

Status: Fixed » Closed (fixed)

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