On: /admin/people/roles
Role -> Add own registration page
Result: The website encountered an unexpected error. Please try again later.

TypeError: Argument 3 passed to Drupal\multiple_registration\Controller\MultipleRegistrationController::__construct() must be an instance of Drupal\path_alias\AliasManager, instance of Drupal\Core\Path\AliasManager given, called in /code/core/lib/Drupal/Component/DependencyInjection/Container.php on line 285 in Drupal\multiple_registration\Controller\MultipleRegistrationController->__construct() (line 89 of /code/modules/multiple_registration/src/Controller/MultipleRegistrationController.php)

What does this error mean?
How do I fix it?

Comments

etr68 created an issue. See original summary.

jtor’s picture

getting same error. only on ver 2.9.1, no issue on 2.9

ramya balasubramanian’s picture

Assigned: Unassigned » ramya balasubramanian
ramya balasubramanian’s picture

Assigned: ramya balasubramanian » Unassigned
Status: Active » Needs review
StatusFileSize
new1.05 KB
new394.06 KB

Hi @jtor, etr68,
I have added the patch and screenshot. Please have a look.

etr68’s picture

Ramya,

Thank you very much for your help on this issue.

I was not able to apply the patch automatically. I did manually edit the file. From there I did get to the next screen.

But the next screen gave the dread "The website encountered an unexpected error. Please try again later."

With the log saying:

Error: Class 'Drupal\path_alias\AliasStorage' not found in Drupal\multiple_registration\Controller\MultipleRegistrationController->getRegisterAliasStorage() (line 299 of /code/modules/multiple_registration/src/Controller/MultipleRegistrationController.php)

ramya balasubramanian’s picture

Hi @etr68,
Ok. I will upload the patch again.we have a separate issue link for that error https://www.drupal.org/project/multiple_registration/issues/3136529. Please have a look

ramya balasubramanian’s picture

Please try this one, I have checked locally I can able to apply the patch. Please let me know if you are facing any issues.

pradeepjha’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks good to me. After applying patch, multiple registration form is opening for roles. Please check attached screenshot.
multiple-registration

pradeepjha’s picture

StatusFileSize
new60.79 KB
littlepixiez’s picture

StatusFileSize
new719 bytes

Hi there. This looks like it's an issue with the service being passed in being the wrong one - it should be "@path_alias.manager", not the deprecated "@path.alias_manager" - looks like it has been fixed in the controller but not in services.yml. The attached patch should fix it and still keep using the correct service, we probably don't want to remove the type in the constructor and keep it strict. :)

ysamoylenko’s picture

Hello everyone,
Thank you for the report and reviewers efforts.
The patch will be committed soon.

ysamoylenko’s picture

Status: Reviewed & tested by the community » Fixed

The patch was committed.

nikolas.tatianenko’s picture

Issue tags: +epam-contrib

Status: Fixed » Closed (fixed)

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