Closed phptek closed 6 years ago
Reproduced, thanks - environments other then dev
Fix at #22
I believe this will have been fixed by https://github.com/silverstripe/silverstripe-framework/pull/7756
Retesting this now
Tested on 4.1.x-dev (merged up, contains https://github.com/silverstripe/silverstripe-framework/commit/a8c156a) and it's still a problem
Right, we have many levels of nested controllers sometimes; Hence the need for the single unified source of truth.
I am still experiencing this on 4.2.1.
I am requesting the session in onAfterInit
in a Controller extension.
@Makreig yeah the second patch for this in core hasn't been released yet: https://github.com/silverstripe/silverstripe-framework/pull/8324
Using
dev-master
(as atd980d7f049b9b8
) in SilverStripetest
mode (deployed to SilverStripe Platform UAT) when attempting to login to/admin
the following exception is thrown:This results in an inability to even see the admin login screen, with a 500 error displaying instead.
I traced this back to
Extension/CwpControllerExtension.php
on line 124 where the call togetSession()
in$this->owner->getRequest()->getSession()->get('AutoLoginHash')
fails.To "prove" this is the rogue logic, I removed this
else if
condition, redeployed and I could once again see the admin screen.The "owner" is the current
Controller
which obviously (should) have a validHTTPRequest
object, but I haven't dug any deeper. Over to you @robbieaverill !?