Skip to main content
Removing incorrect tags, adding relevant tags
Link
Jaypan
  • 18k
  • 3
  • 34
  • 65
added 82 characters in body; edited title
Source Link
Patrick Kenny
  • 29.3k
  • 19
  • 139
  • 316

Drupal - AliasManagerInterface -deprecated Drupal\Core\Path\AliasManagerInterface

Error:

The website encountered an unexpected error. Please try again later. TypeError: Argument passed to Drupal{module name}\Theme{class name}::__construct() must implement interface Drupal\path_alias\AliasManagerInterface, instance of Drupal\Core\Path\AliasManager

The website encountered an unexpected error. Please try again later. TypeError: Argument passed to Drupal{module name}\Theme{class name}::__construct() must implement interface Drupal\path_alias\AliasManagerInterface, instance of Drupal\Core\Path\AliasManager

Getting error in the construct method, please suggest a solution to rectify the error.

Try to modify the "AliasManagerInterface" as "use Drupal\Core\Path\AliasManagerInterface" deprecated and we are now using "use Drupal\path_alias\AliasManagerInterface" but actually getting error inside construct method as mentioned below.

code:

use Drupal\path_alias\AliasManagerInterface;

/**

  • Protected pathAlias variable.
  • @var Drupal\path_alias\AliasManagerInterface */ protected $pathAlias;

public function __construct(AliasManagerInterface $pathAlias) {

 use Drupal\path_alias\AliasManagerInterface;



  /**
   * Protected pathAlias variable.
   *
   * @var Drupal\path_alias\AliasManagerInterface
   */
  protected $pathAlias;


  public function __construct(AliasManagerInterface $pathAlias) {
    
    $this->pathAlias = $pathAlias;

  }

}

Drupal - AliasManagerInterface -deprecated Drupal\Core\Path\AliasManagerInterface

Error:

The website encountered an unexpected error. Please try again later. TypeError: Argument passed to Drupal{module name}\Theme{class name}::__construct() must implement interface Drupal\path_alias\AliasManagerInterface, instance of Drupal\Core\Path\AliasManager

Getting error in the construct method, please suggest a solution to rectify the error.

Try to modify the "AliasManagerInterface" as "use Drupal\Core\Path\AliasManagerInterface" deprecated and we are now using "use Drupal\path_alias\AliasManagerInterface" but actually getting error inside construct method as mentioned below.

code:

use Drupal\path_alias\AliasManagerInterface;

/**

  • Protected pathAlias variable.
  • @var Drupal\path_alias\AliasManagerInterface */ protected $pathAlias;

public function __construct(AliasManagerInterface $pathAlias) {

$this->pathAlias = $pathAlias;

}

AliasManagerInterface -deprecated Drupal\Core\Path\AliasManagerInterface

Error:

The website encountered an unexpected error. Please try again later. TypeError: Argument passed to Drupal{module name}\Theme{class name}::__construct() must implement interface Drupal\path_alias\AliasManagerInterface, instance of Drupal\Core\Path\AliasManager

Getting error in the construct method, please suggest a solution to rectify the error.

Try to modify the "AliasManagerInterface" as "use Drupal\Core\Path\AliasManagerInterface" deprecated and we are now using "use Drupal\path_alias\AliasManagerInterface" but actually getting error inside construct method as mentioned below.

code:

 use Drupal\path_alias\AliasManagerInterface;



  /**
   * Protected pathAlias variable.
   *
   * @var Drupal\path_alias\AliasManagerInterface
   */
  protected $pathAlias;


  public function __construct(AliasManagerInterface $pathAlias) {
    
    $this->pathAlias = $pathAlias;

  }
Source Link
user106559
user106559

Drupal - AliasManagerInterface -deprecated Drupal\Core\Path\AliasManagerInterface

Error:

The website encountered an unexpected error. Please try again later. TypeError: Argument passed to Drupal{module name}\Theme{class name}::__construct() must implement interface Drupal\path_alias\AliasManagerInterface, instance of Drupal\Core\Path\AliasManager

Getting error in the construct method, please suggest a solution to rectify the error.

Try to modify the "AliasManagerInterface" as "use Drupal\Core\Path\AliasManagerInterface" deprecated and we are now using "use Drupal\path_alias\AliasManagerInterface" but actually getting error inside construct method as mentioned below.

code:

use Drupal\path_alias\AliasManagerInterface;

/**

  • Protected pathAlias variable.
  • @var Drupal\path_alias\AliasManagerInterface */ protected $pathAlias;

public function __construct(AliasManagerInterface $pathAlias) {

$this->pathAlias = $pathAlias;

}