- π―π΅Japan tyler36 Osaka
Confirmed fix on Drupal
10.1
.## Test
1. Install "user_redirect"
1. Enable module via drush:drush en user_redirect
1. Log in as administror, error appears1. Logout
1. Install patch MR!2
1. Log in as administrator, error no longer displays.
1. Disabling patch causes error to re-appear. - π³π¬Nigeria chike Nigeria
I had a redirect set for 'Login' and none set for 'Logout' then I tried logging out and got this error,
ArgumentCountError: Too few arguments to function Drupal\user_redirect\UserRedirect::__construct(), 3 passed in /home/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 6 expected in Drupal\user_redirect\UserRedirect->__construct() (line 80 of /home/public_html/modules/contrib/user_redirect/src/UserRedirect.php).
I applied this patch and the error was solved.
Thanks very much for the patch and the module. I am getting the following PHP warnings after login as admin from /user/login. I tried the fixes and it seems to work on core 10.1.5.
Warning: Undefined array key "authenticated" in Drupal\user_redirect\UserRedirect->prepareDestination() (line 83 of /code/web/modules/contrib/user_redirect/src/UserRedirect.php)
Warning: Trying to access array offset on value of type null in Drupal\user_redirect\UserRedirect->prepareDestination() (line 83 of /code/web/modules/contrib/user_redirect/src/UserRedirect.php)I created a patch on 2.0.0 to see if this patch can be applied properly since composer doesn't see 2.0.x which has the fixes.
Problem 1
- Root composer.json requires drupal/user_redirect default, found drupal/user_redirect[dev-1.0.x, 1.0.0, 1.0.1, 1.0.2, 1.0.x-dev (alias of dev-1.0.x), 2.0.0] but it does not match the constraint.