I can fix in composer.json but I don't know where oauth2-google fonctions are used, and if there is some imcompatibilities with version 4.0.
I'll try to check this week-end
Are you sure? The composer.json file is in civicrm/civicrm-core github project, not in civicrm/civicrm-drupal project.
After upgrading Drupal from 9 to 10 it is not possible to update social_auth_google. Version conflict.
composer require 'drupal/social_auth_google:^4.0' ./composer.json has been updated Running composer update drupal/social_auth_google Gathering patches for root package. Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.
Problem 1 - Root composer.json requires drupal/social_auth_google ^4.0 -> satisfiable by drupal/social_auth_google[4.0.0-beta1, 4.0.0, 4.0.1, 4.0.x-dev]. - drupal/social_auth_google[4.0.0-beta1, ..., 4.0.x-dev] require league/oauth2-google ^4.0 -> found league/oauth2-google[4.0.0, 4.0.1] but the package is fixed to 3.0.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Expected behaviour
----------------------------------------
Installation without error
Environment information
----------------------------------------
* __CiviCRM:__ _5.68.0_
* __PHP:__ _8.1.18__
* __CMS:__ _Drupal 10.1.7_
* __Database:__ _10.5.21-MariaDB_
* __Web Server:__ _Apache_
Comments
----------------------------------------
league/oauth2-google version is fixed in civicrm-core
composer why league/oauth2-google
civicrm/civicrm-core 5.68.0 requires league/oauth2-google (^3.0)
Create User Record (civicrm/contact/view/useradd?reset=1&action=add&cid=xxxx) don't find existing contact, and create a new one with only email adress of the existing contact
UFid should be set to existing account, and no new one should be created
It seems to me that the problem lies in UFMatch.php, in the synchronizeUFMatch() function, which doesn't retrieve the contact_id if it exists.
As a workaround, I propose replacing lines 252 and 253
$contactID = civicrm_api3('Contact', 'create', $contactParameters)['id'];
$ufmatch->contact_id = $contactID;
with
// If contactID exist, user exist and use it
if (isset($dedupeParameters['contact_id'])) {
$ufmatch->contact_id = $dedupeParameters['contact_id'];
}
else {
// Conatct does not exist, so create a new one
$contactID = civicrm_api3('Contact', 'create', $contactParameters)['id'];
$ufmatch->contact_id = $contactID;
}
PR#25148 created (https://github.com/civicrm/civicrm-core/pull/25148)
Since Drupal 8.2 per-table prefixes are no longer supported, so System Settings / CMS Database Integration menu should no longer display the 'Drypal 7' mapping table
$databases['default']['default']['prefix']= [ 'default' => 'drupal_', 'civicrm_acl' => '', 'civicrm_acl_cache' => '', 'civicrm_acl_contact_cache' => '', 'civicrm_acl_entity_role' => '', 'civicrm_action_log' => '', 'civicrm_action_mapping' => '', 'civicrm_action_schedule' => '', 'civicrm_activity' => '', 'civicrm_activity_contact' => '', ....
$databases['civicrm']['default'] = [ 'database' => 'xxxxxx', 'username' => 'xxxxxx', 'password' => 'set your db password', 'host' => '127.0.0.1', 'port' => '', 'driver' => 'mysql', 'prefix' => '', 'namespace' => 'Drupal\Core\Database\Driver\mysql', 'collation' => 'utf8mb4_general_ci', ];
Anything else you would like the reviewer to note.
No new user created and CMS userID should be associated to existing Civicrm
In /vendor/civicrm/civicrm-core/CRM/Core/BAO/UFMatch.php, line 250, ll the information on the Civicrm account is deleted, and only the email address is present. In the continuation of the treatment, it is not possible any more to find the account thus a new account is created in /vendor/civicrm/civicrm-coreCRM/CoreBAO/CMSUser.php
Replace in /vendor/civicrm/civicrm-core/CRM/Core/BAO/UFMatch.php, line 250 $params = ['email' => $primary_email]; by $params['email'] = $primary_email;
@jaapjansma, I have patches but I didn't find the repos concerned :-(.
Civicrm 5.43 and 5.44 under Drupal 8, launching kcfinder from ckeditor give an 500 error. Php script integration/civicrm.php try to call civicrm.config.php located in web/libraries/civicrm/, and this file does not exist. Copying this file from an Drupal 7 installation is not sufficent, because civicrm.settings.php is not searched in correct location.
--- ../../mcm65/sites/all/modules/civicrm/civicrm.config.php 2021-11-15 21:42:13.000000000 +0100
+++ libraries/civicrm/civicrm.config.php 2021-12-07 21:14:33.380121826 +0100
@@ -87,6 +87,11 @@
return $confdir;
}
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'default' .
+ DIRECTORY_SEPARATOR . 'civicrm.settings.php')) {
+ return $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'default';
+ }
+
if (!file_exists($confdir) && !$skipConfigError) {
echo "Could not find valid configuration dir, best guess: $confdir<br/><br/>\n";
exit();
Another point, .htaccess in /web directory Deny access to most php files in public directory. We must allow access to php files under kcfinder directory :
# For security reasons, deny access to other PHP files on public sites.
# Note: The following URI conditions are not anchored at the start (^),
# because Drupal may be located in a subdirectory. To further improve
# security, you can replace '!/' with '!^/'.
# Allow access to PHP files in /core (like authorize.php or install.php):
RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
# Allow access to test-specific PHP files:
RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?.php
# Allow access to Statistics module's custom front controller.
# Copy and adapt this rule to directly execute PHP files in contributed or
# custom modules or to run another PHP application in the same directory.
RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$
RewriteCond %{REQUEST_URI} !/libraries/civicrm/packages/kcfinder/[a-z_]+\.php$
RewriteCond %{REQUEST_URI} !/libraries/civicrm/packages/kcfinder/.*/[a-z_]+\.php$
# Deny access to any other PHP files that do not match the rules above.
# Specifically, disallow autoload.php from being served directly.
RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
PR #19989 created
Here is a patch: f7262040e7bf9849041eac49e98d04352907eccd.diff
In Drupal8, CMS intergration don't show table mapping, because $database global variable is no more defined and can be retreived using Drupal\Core\Database\Database::getConnectionInfo()