Problem/Motivation
TypeError: Drupal\Core\Form\FormState::setRedirectUrl(): Argument #1 ($url) must be of type Drupal\Core\Url, null given, called in C:\wamp64\www\my_learning_site\web\modules\Contrib\customerror\customerror.module on line 101 in Drupal\Core\Form\FormState->setRedirectUrl() (line 1034 of core\lib\Drupal\Core\Form\FormState.php).
Steps to reproduce
step 1. install Customerror module and enable it.
step 2. Try to login
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | issues-3401535-must-be-of-type-null-given-fixed.patch | 631 bytes | viren18febs |
Issue fork customerror-3401535
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
Comment #2
viren18febs commentedI have fixed the issues and added a patch. please review
Comment #3
gisleWe need someone else to review the patch.
Comment #4
shalini_jha commentedhi @gisle
I have tested the patch and it's working fine for me.
I am able to log in after enabling this module with this patch.
Comment #5
gisleThe patch works, put it is still not correct.
The statement:
returns a boolean value (i.e.
trueorfalse). The patch tests whether this is value is!empty(which in PHP happens to be equivalent totrue). However, doing so obfuscates the logic. We just want to check if this boolean value istrue.I've created a MR with the correct logic.
Comment #7
gisleMerged. Pipelines fail for unrelated causes.
It should be noted that the destination path is no correctly extracted, but the redirect still does not happen. See separate bug report: #3401346: Redirect after login does not work