-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#4988 Standalone - use regular php session during install #29352
dev/core#4988 Standalone - use regular php session during install #29352
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
The issue associated with the Pull Request can be viewed at https://lab.civicrm.org/dev/core/-/issues/4988 |
577a293
to
ed626ae
Compare
Scrap that! I think i had the wrong patch! |
With this patch, civi installed and got me to the login screen. However, then the javascript dies on hitting Submit: bc...
I followed that - it does seem a php8.1 error in our crypto code but then got another error, this time from JWT:
I couldn't find anything in the issue queue about this, so wondering if it is related at all?! Perhaps we're using a JWT on the session during installation or something? Does this PR work for you? |
I've seen this in my client's logs, but haven't been able to track it down to anything in particular yet. |
@MegaphoneJon do you have this patch or something similar applied? #29345 |
I do not. But also I don't want us to hijack this PR for the discussion. I'll look into this later and create a ticket. |
Converting this to draft because I think collective wisdom is that #29362 is the better solution. If you think otherwise, shout! |
Yep, that patch fixed the login issue for me, thanks @seamuslee001 I'll rebase both of these for good measure but I think the other one is the way to go |
ed626ae
to
eedb424
Compare
a731990
to
1f88c6d
Compare
After an interesting tour round the houses I think I'm back to preferring this as being the neatest and most reliable approach. It's right at the danger point where we call the extension class, it's in the System utils rather than adding conditionals into core code, and... it works. I've added a commit to use a distinct cookie name during install, to avoid any nasty collisions between the real session and this temporary one. |
@ufundo That sounds pretty persuasive to me... Setting a separate cookie for the setup-screen makes perfect sense (given the different session-storage requirements). |
I tried installing from this PR. The installer ran fine, but on clicking through to civicrm (login) I see:
These notices show on every page. I tried deleting my cookies, which correctly bounces me back to the login screen, but still with the same notices. |
Update: I can't reproduce the error messages I had earlier, having done two fresh installs now, so let's assume that didn't happen. Merging! Thanks @ufundo great to have this one out the way. |
woohoo thanks @artfulrobot :) |
Before
Installing Standalone through the web UI crashes because the installer wants to initialise a session before the SessionHandler provided by Standaloneusers extension is available.
After
Use the default php session handler during install.
Technical Details
This just opts out of the custom SessionHandler based on
CIVI_SETUP
being set - other parameters to thesession_start
call ( in particular the custom session cookie name ) are retained.Questions:
CIVI_SETUP
? could anything bad happen if CIVI_SETUP is set when it shouldn't be?standaloneusers
session happen? will anything important from the session be lost at this point? e.g. notices from the install phase?An alternative solution is to hook in early to enable the
standaloneusers
extension: #29362