-
-
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 enable standaloneusers extension early in Standalone install #29362
dev/core#4988 enable standaloneusers extension early in Standalone install #29362
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 |
I ran this and got it installed, then had the same JWT problems as |
b13982e
to
20691a2
Compare
20691a2
to
071033b
Compare
Issues at the login screen were fixed by applying #29345 . Rebasing onto master to incorporate that, and I now get a clean install all the way through. |
@totten - it sounded like you might have some concerns about the potential fragility of the container if installing at this point? Potential gremlins around midnight you said? |
@ufundo Yeah... In my mind, the series of tasks under I haven't read enough to try the use-case here, but I would flag another possibility like: diff --git a/setup/res/index.php.txt b/setup/res/index.php.txt
index 42157b5f98..056fcdd9a6 100644
--- a/setup/res/index.php.txt
+++ b/setup/res/index.php.txt
@@ -126,6 +126,7 @@ else {
$coreUrl = \Civi\Setup::instance()->getModel()->mandatorySettings['userFrameworkResourceURL'];
+ \CRM_Core_Session::useFakeSession();
$ctrl = \Civi\Setup::instance()->createController()->getCtrl();
$ctrl->setUrls([
// The URL of this setup controller. May be used for POST-backs That function should be pretty low-dependency (doesn't require any services; it only overrides a static variable). In theory, it could also address issues where (I'm not certain how it interacts with standalone's session-handler. But this function is used in other cases where sessions aren't reliable -- e.g. stateless HTTP API authentication and CLI-pipe APIs.) |
Given these concerns, and not being able to get useFakeSession to work as I'd like, I think I'm going back to falling back to regular PHP session... #29352 |
I have tested this patch and now the installer works. |
Closing as #29352 merged. |
Before
Installing Standalone through the web ui fails because we don't have the SessionHandler from standaloneusers early enough.
After
Hook in earlier to enable this extension specifically.
Technical Details
This resolves the main path issue that the installer tries to start a session in
BootstrapCivi.civi-setup.php
here at\Civi\Setup::PRIORITY_MAIN - 200
.However you can have a problem earlier if warnings are generated about directories, which
CRM_Core_Config_MagicMerge
then tries to put in the session, which then causes a crash.In particular I hit this one: #29354
Comments
Alternative approach just using regular PHP session instead during the whole install #29352