Problem/Motivation

Internal Server Error occurs when clicking an Add Login Destination button :

TypeError: Argument 2 passed to Drupal\login_destination\Form\LoginDestinationRuleForm::__construct() must be an instance of Drupal\login_destination\Form\LanguageManagerInterface, instance of Drupal\Core\Language\LanguageManager given, called in /var/www/html/web/modules/contrib/login_destination/src/Form/LoginDestinationRuleForm.php on line 53 in Drupal\login_destination\Form\LoginDestinationRuleForm->__construct() (line 42 of /var/www/html/web/modules/contrib/login_destination/src/Form/LoginDestinationRuleForm.php)
#0 /var/www/html/web/modules/contrib/login_destination/src/Form/LoginDestinationRuleForm.php(53): Drupal\login_destination\Form\LoginDestinationRuleForm->__construct(Object(Drupal\Core\Config\Entity\ConfigEntityStorage), Object(Drupal\Core\Language\LanguageManager))
#1 /var/www/html/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\login_destination\Form\LoginDestinationRuleForm::create(Object(Drupal\Core\DependencyInjection\Container))
#2 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(226): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('Drupal\\login_de...')
#3 /var/www/html/web/core/lib/Drupal/Core/Entity/HtmlEntityFormController.php(69): Drupal\Core\Entity\EntityTypeManager->getFormObject('login_destinati...', 'add')
#4 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(58): Drupal\Core\Entity\HtmlEntityFormController->getFormObject(Object(Drupal\Core\Routing\RouteMatch), 'login_destinati...')
#5 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
CommentFileSizeAuthor
#2 3178518-2.patch631 bytesyas

Comments

yas created an issue. See original summary.

yas’s picture

Status: Active » Needs review
StatusFileSize
new631 bytes

Please review the patch. I hope it fixes the issue.

rsvelko’s picture

Assigned: yas » rsvelko
Status: Needs review » Reviewed & tested by the community

  • rsvelko committed 0a2c46a on 8.x-2.x authored by yas
    Issue #3178518 by yas: Fix a type error of the argument 2 passed to...
rsvelko’s picture

Status: Reviewed & tested by the community » Fixed

  • rsvelko committed eb14f87 on 8.x-1.x authored by yas
    Issue #3178518 by yas: Fix a type error of the argument 2 passed to...

Status: Fixed » Closed (fixed)

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