Drupal issueshttps://lab.civicrm.org/dev/drupal/-/issues2022-04-06T22:13:17Zhttps://lab.civicrm.org/dev/drupal/-/issues/75[regression] `cv` fails on CiviCRM 5.15.02022-04-06T22:13:17ZJonGold[regression] `cv` fails on CiviCRM 5.15.0Any command that attempts to access Civi fails with:
```
[RuntimeException]
Cannot resolve path using "cms.root.url"
```
Civi 5.14.2 works fine.
The issue is `CRM...Any command that attempts to access Civi fails with:
```
[RuntimeException]
Cannot resolve path using "cms.root.url"
```
Civi 5.14.2 works fine.
The issue is `CRM_Utils_System_Drupal8::languageNegotiationURL()`, which was added in 5.15.0. Removing this function restores the correct behavior, but I assume has a detrimental effect on multilingual.
The underlying cause of the error is hidden because of a later PR by @bgm that accounts for the REST API. If you roll back his change, the error becomes:
```
[Drupal\Core\DependencyInjection\ContainerNotInitializedException]
\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.
```5.16.0https://lab.civicrm.org/dev/drupal/-/issues/161Syntax errors when loading sample data2022-03-16T00:25:22ZjotamartosSyntax errors when loading sample dataI'm getting the following error when enabling the sample data during the installation of CiviCRM 5.39.0
```
Cannot execute INSERT INTO `civicrm_acl` (`id`, `name`, `deny`, `entity_table`, `entity_id`, `operation`, `object_table`, `objec...I'm getting the following error when enabling the sample data during the installation of CiviCRM 5.39.0
```
Cannot execute INSERT INTO `civicrm_acl` (`id`, `name`, `deny`, `entity_table`, `entity_id`, `operation`, `object_table`, `object_id`, `acl_table`, `acl_id`, `is_active`) VALUES: DB Error: syntax error
```
I got this error when using the browser and when using the console and the curl command
```
curl --data-urlencode "civicrm_install_type=drupal" --data-urlencode "go=" --data-urlencode "seedLanguage=en_US" --data-urlencode "database=MySQLDatabase" --data-urlencode "mysql[server]=127.0.0.1:3306" --data-urlencode "mysql[database]=civicrm_database" --data-urlencode "mysql[username]=civicrm_user" --data-urlencode "mysql[password]=PASSWORD" --data-urlencode "drupal[server]=127.0.0.1:3306" --data-urlencode "drupal[database]=drupal_database" --data-urlencode "drupal[username]=drupal_user" --data-urlencode "drupal[password]=PASSWORD" --data-urlencode "loadGenerated=1" -H "Content-Type: application/x-www-form-urlencoded" http://127.0.0.1:80/modules/contrib/civicrm/install/index.php
```
Please note that the last parameter (--data-urlencode "loadGenerated=1") is the one that enables the sample data. If I do not include/enable it, the installation works properly.
**Environment:**
CiviCRM 5.39.0
Drupal 7.81.0
PHP 7.3.29
Let me know if you need more info.
Thanks5.40.0https://lab.civicrm.org/dev/drupal/-/issues/169"Your browser session has expired and we are unable to complete your form sub...2022-03-16T00:19:54ZJonGold"Your browser session has expired and we are unable to complete your form submission" on all D9.2 anonymous sessions### Overview
This is an expensive bug, so I'm reporting it even though I don't have complete information.
On all D9.2 sites, anonymous users whose first visit to a CiviCRM page is a contribution or event registration page, will receive ...### Overview
This is an expensive bug, so I'm reporting it even though I don't have complete information.
On all D9.2 sites, anonymous users whose first visit to a CiviCRM page is a contribution or event registration page, will receive the error "Your browser session has expired and we are unable to complete your form submission" on submission. If they resubmit the page it will go through.
### Steps to Replicate
* Install a fresh D8 buildkit site.
* Upgrade to D9.2.0 or higher.
* Open an incognito window and paste in the URL to an event/contribution page (easiest to test if it's a free event with a confirmation page).
* Submit the page. See the error.
### Analysis
I'm still tracking this down and I don't really know the Civi session manager well - but on initial page load, `CRM_Core_Key::sessionID()` returns an empty string. On submitting the form, it finds a session ID correctly, so in `CRM_Core_Key::validate()` the expected key doesn't match the actual key.
While debugging, it's good to note that you can `composer update` to switch between D9.1.3 and D9.2.8 to switch between unbugged and bugged behavior.
It looks like this is the cause:
https://www.drupal.org/node/30063065.43.2https://lab.civicrm.org/dev/drupal/-/issues/54Drupal8 CiviCRM conflicts with Masquerade module2022-02-24T00:33:50ZJonGoldDrupal8 CiviCRM conflicts with Masquerade moduleReported on d.o originally by jptillman (who is on chat.c.o with the same name) in the Masquerade queue: https://www.drupal.org/project/masquerade/issues/3019665
I confirmed the same issue, and also confirmed that uninstalling CiviCRM r...Reported on d.o originally by jptillman (who is on chat.c.o with the same name) in the Masquerade queue: https://www.drupal.org/project/masquerade/issues/3019665
I confirmed the same issue, and also confirmed that uninstalling CiviCRM resolves this issue. This fits a pattern of Civi having some sort of incorrect interaction with the D8 user login - see #53, core#231, and [CRM-19878](https://issues.civicrm.org/jira/browse/CRM-19878) for other examples.5.41.0https://lab.civicrm.org/dev/drupal/-/issues/172Deprecated function drupal_get_installed_schema_version() in 9.3, but with a ...2022-01-02T15:47:07ZDaveDDeprecated function drupal_get_installed_schema_version() in 9.3, but with a twistdrupal_get_installed_schema_version() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::getInstalledVersion() or \Drupal\Core\Update\UpdateHookRegistry::getAllInstalledVersions()...drupal_get_installed_schema_version() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::getInstalledVersion() or \Drupal\Core\Update\UpdateHookRegistry::getAllInstalledVersions() instead. See https://www.drupal.org/node/2444417
This is in vendor\civicrm\civicrm-core\CRM/Utils/System/Drupal8.php:
```
public function getModules() {
$modules = [];
$module_data = \Drupal::service('extension.list.module')->reset()->getList();
foreach ($module_data as $module_name => $extension) {
if (!isset($extension->info['hidden']) && $extension->origin != 'core') {
$extension->schema_version = drupal_get_installed_schema_version($module_name);
$modules[] = new CRM_Core_Module('drupal.' . $module_name, ($extension->status == 1));
}
}
return $modules;
}
```
The reason I haven't just put up a simple replacement PR is because if you look at the above function you'll notice schema_version is never used. If you look at the docblock in Base.php it says "List modules installed in the CMS, _including enabled and disabled ones_." Looking at the drupal 7 version (in DrupalBase.php), it does this:
`'SELECT name, status FROM {system} WHERE type = \'module\' AND schema_version <> -1'`
which means only the modules that are installed (but possibly disabled - that's what status is). Now in drupal 8 there is no concept of disabled, it's either installed or uninstalled, but the drupal 8 code is including all of them. In drupal 8 $extension->status means installed or uninstalled.
So two options are:
1. Try to match the drupal 7 implementation/docblock, which means excluding it if $extension->status is 0, and always passing 1 as the second parameter to CRM_Core_Module(), because disabled doesn't mean anything in drupal 8.
2. Leave it the way it is and just remove the unused line about schema_version.
Trying to track down where this gets used, it seems it's mostly in ManagedEntities, which I usually stay away from, and I'm not even sure why ManagedEntities would be dealing with drupal modules other than civicrm itself.
So I'm tempted to stop thinking about it and do item 2.5.46.0https://lab.civicrm.org/dev/drupal/-/issues/163Session erroneously getting set to NULL on Drupal user login2021-11-11T23:32:18ZsteveplatzSession erroneously getting set to NULL on Drupal user loginAnonymous sessions may contain data that needs to be retained after login, for example commerce cart data. In the initialize() method of the core session class civicrm/civicrm-core/CRM/Core/Session.php, there is a check for a changed ses...Anonymous sessions may contain data that needs to be retained after login, for example commerce cart data. In the initialize() method of the core session class civicrm/civicrm-core/CRM/Core/Session.php, there is a check for a changed session id, which if it evaluates to TRUE will set a current session with data to NULL.
```php
// remove $_SESSION reference if session is changed
if (($sid = session_id()) !== $this->sessionID) {
$this->_session = NULL;
$this->sessionID = $sid;
}
```
I've tested this with Drupal 9.2.4 CiviCRM 5.35 and Drupal Commerce 2.26. This specific change was added in https://lab.civicrm.org/dev/drupal/-/issues/98 for Drupal 7.5.43.0https://lab.civicrm.org/dev/drupal/-/issues/166Drupal function ip_address no longer exists after D72021-09-22T13:02:47ZAlanDixonDrupal function ip_address no longer exists after D7There are times where CiviCRM likes to know who it's talking to, i.e. the ip address of the visitor.
This matters especially when it gets passed on to a payment processor.
Here's a utility function that does that: https://github.com/ci...There are times where CiviCRM likes to know who it's talking to, i.e. the ip address of the visitor.
This matters especially when it gets passed on to a payment processor.
Here's a utility function that does that: https://github.com/civicrm/civicrm-core/blob/b599743f3daa46ab96c09ebe410fbb833cdd080f/CRM/Utils/System.php#L1293
This code is fairly naive, but makes use of the fact that Drupal 7 (and earlier) that had a function ip_address that would pay attention to the drupal configuration to be able to deal with front end proxies (like Varnish/hitch).
Unfortunately, D8/9 no longer includes this function, as also noted in this issue for iATS payments.
https://github.com/iATSPayments/com.iatspayments.civicrm/issues/370
Should we continue to provide spaghetti/cms-specific support for front end proxy confusion here? Are there better ways of doing this?https://lab.civicrm.org/dev/drupal/-/issues/13Contact Image uploaded from Drupal Webform doesn't render on Drupal View as a...2021-09-08T11:25:32ZjitendraContact Image uploaded from Drupal Webform doesn't render on Drupal View as a thumbnail.This is an extension of a fix done recently via https://github.com/civicrm/civicrm-core/pull/11681. As it only contained the fix to render the image on the contact summary page, we also have this issue on a Drupal view which needs to be ...This is an extension of a fix done recently via https://github.com/civicrm/civicrm-core/pull/11681. As it only contained the fix to render the image on the contact summary page, we also have this issue on a Drupal view which needs to be addressed. To replicate, upload an image for a contact using a webform and try to render it as a thumbnail on a Drupal view.
Also, if the filename of the image has a space in it, it fails to load on the view.5.43.0https://lab.civicrm.org/dev/drupal/-/issues/98CiviCRM session instance not working when Masquerading in Drupal 72021-09-01T21:02:42ZMichael McAndrewCiviCRM session instance not working when Masquerading in Drupal 7Have just upgraded to D7-5.20.1 and noticed that CRM_Core_Session::singleton() does not work when masquerading.
Setting a breakpoint in a Drupal page while masquerading and running `Civi::log()->debug(var_export(CRM_Core_Session::single...Have just upgraded to D7-5.20.1 and noticed that CRM_Core_Session::singleton() does not work when masquerading.
Setting a breakpoint in a Drupal page while masquerading and running `Civi::log()->debug(var_export(CRM_Core_Session::singleton(),true))`
Results in the following in the log:
```
Dec 11 13:08:57 [debug] CRM_Core_Session::__set_state(array(
'_key' => 'CiviCRM',
'_session' =>
array (
'masquerading' => '76',
),
))
```5.23.0https://lab.civicrm.org/dev/drupal/-/issues/162Patches fail to apply on a fresh D9 site2021-08-26T16:58:54ZfkohrtPatches fail to apply on a fresh D9 siteI am trying to install CiviCRM 5.40 on a fresh Drupal 9 site.
But when running `composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.40' --with-all-dependencies` several patches fail to apply:
<details>
<summary>Console output...I am trying to install CiviCRM 5.40 on a fresh Drupal 9 site.
But when running `composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.40' --with-all-dependencies` several patches fail to apply:
<details>
<summary>Console output</summary>
```
./composer.json has been updated
Running composer update civicrm/civicrm-core civicrm/civicrm-packages civicrm/civicrm-drupal-8 --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 49 installs, 1 update, 0 removals
- Locking adrienrn/php-mimetyper (0.2.2)
- Locking brick/math (0.9.3)
- Locking brick/money (0.5.2)
- Locking cache/integration-tests (0.17.0)
- Locking cache/tag-interop (1.0.1)
- Locking civicrm/civicrm-core (5.40.2)
- Locking civicrm/civicrm-cxn-rpc (v0.20.12.01)
- Locking civicrm/civicrm-drupal-8 (5.40.2)
- Locking civicrm/civicrm-packages (5.40.2)
- Locking civicrm/composer-compile-lib (v0.5)
- Locking civicrm/composer-compile-plugin (v0.16)
- Locking civicrm/composer-downloads-plugin (v3.0.1)
- Locking cweagans/composer-patches (1.7.1)
- Locking dflydev/apache-mime-types (v1.0.1)
- Locking dompdf/dompdf (v1.0.2)
- Locking electrolinux/phpquery (0.9.6)
- Locking firebase/php-jwt (v5.4.0)
- Locking league/csv (9.7.1)
- Locking league/oauth2-client (2.6.0)
- Locking league/oauth2-google (3.0.4)
- Locking marcj/topsort (1.1.0)
- Locking padaliyajay/php-autoprefixer (1.3)
- Locking paragonie/random_compat (v9.99.100)
- Locking pear/auth_sasl (v1.1.0)
- Locking pear/db (v1.10.0)
- Locking pear/log (1.13.3)
- Locking pear/mail (v1.4.1)
- Locking pear/mail_mime (1.10.10)
- Locking pear/net_smtp (1.9.2)
- Locking pear/net_socket (1.0.14)
- Locking pear/validate_finance_creditcard (0.7.0)
- Locking phenx/php-font-lib (0.5.2)
- Locking phenx/php-svg-lib (v0.3.3)
- Locking phpoffice/phpword (0.18.2)
- Locking phpseclib/phpseclib (2.0.33)
- Locking psr/simple-cache (1.0.1)
- Locking sabberworm/php-css-parser (8.3.1)
- Locking scssphp/scssphp (v1.6.0)
- Locking symfony/config (v4.4.27)
- Downgrading symfony/finder (v5.3.4 => v4.4.27)
- Locking symfony/polyfill-php81 (v1.23.0)
- Locking tecnickcom/tcpdf (6.4.2)
- Locking togos/gitignore (1.1.1)
- Locking totten/ca-config (v17.05.0)
- Locking totten/lurkerlite (1.3.0)
- Locking tplaner/when (v3.0.0)
- Locking tubalmartin/cssmin (v4.1.1)
- Locking xkerman/restricted-unserialize (1.1.12)
- Locking zetacomponents/base (1.9.3)
- Locking zetacomponents/mail (1.9.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 49 installs, 1 update, 0 removals
- Downloading cweagans/composer-patches (1.7.1)
- Downloading togos/gitignore (1.1.1)
- Downloading civicrm/composer-downloads-plugin (v3.0.1)
- Downloading totten/lurkerlite (1.3.0)
- Downloading civicrm/composer-compile-plugin (v0.16)
- Downloading dflydev/apache-mime-types (v1.0.1)
- Downloading adrienrn/php-mimetyper (0.2.2)
- Downloading brick/math (0.9.3)
- Downloading brick/money (0.5.2)
- Downloading cache/tag-interop (1.0.1)
- Downloading cache/integration-tests (0.17.0)
- Downloading phpseclib/phpseclib (2.0.33)
- Downloading civicrm/civicrm-cxn-rpc (v0.20.12.01)
- Downloading zetacomponents/base (1.9.3)
- Downloading zetacomponents/mail (1.9.2)
- Downloading xkerman/restricted-unserialize (1.1.12)
- Downloading tplaner/when (v3.0.0)
- Downloading totten/ca-config (v17.05.0)
- Downloading tecnickcom/tcpdf (6.4.2)
- Downloading symfony/finder (v4.4.27)
- Downloading symfony/polyfill-php81 (v1.23.0)
- Downloading symfony/config (v4.4.27)
- Downloading psr/simple-cache (1.0.1)
- Downloading phpoffice/phpword (0.18.2)
- Downloading pear/validate_finance_creditcard (0.7.0)
- Downloading pear/net_socket (1.0.14)
- Downloading pear/net_smtp (1.9.2)
- Downloading pear/mail_mime (1.10.10)
- Downloading pear/mail (v1.4.1)
- Downloading pear/log (1.13.3)
- Downloading pear/db (v1.10.0)
- Downloading pear/auth_sasl (v1.1.0)
- Downloading marcj/topsort (1.1.0)
- Downloading paragonie/random_compat (v9.99.100)
- Downloading league/oauth2-client (2.6.0)
- Downloading league/oauth2-google (3.0.4)
- Downloading league/csv (9.7.1)
- Downloading firebase/php-jwt (v5.4.0)
- Downloading electrolinux/phpquery (0.9.6)
- Downloading sabberworm/php-css-parser (8.3.1)
- Downloading phenx/php-svg-lib (v0.3.3)
- Downloading phenx/php-font-lib (0.5.2)
- Downloading dompdf/dompdf (v1.0.2)
- Downloading tubalmartin/cssmin (v4.1.1)
- Downloading scssphp/scssphp (v1.6.0)
- Downloading padaliyajay/php-autoprefixer (1.3)
- Downloading civicrm/composer-compile-lib (v0.5)
- Downloading civicrm/civicrm-core (5.40.2)
- Downloading civicrm/civicrm-drupal-8 (5.40.2)
- Downloading civicrm/civicrm-packages (5.40.2)
- Installing cweagans/composer-patches (1.7.1): Extracting archive
No patches supplied.
Gathering patches for dependencies. This might take a minute.
- Installing togos/gitignore (1.1.1): Extracting archive
- Installing civicrm/composer-downloads-plugin (v3.0.1): Extracting archive
- Installing totten/lurkerlite (1.3.0): Extracting archive
- Installing civicrm/composer-compile-plugin (v0.16): Extracting archive
- Installing dflydev/apache-mime-types (v1.0.1): Extracting archive
- Installing adrienrn/php-mimetyper (0.2.2): Extracting archive
- Installing brick/math (0.9.3): Extracting archive
- Installing brick/money (0.5.2): Extracting archive
- Installing cache/tag-interop (1.0.1): Extracting archive
- Installing cache/integration-tests (0.17.0): Extracting archive
- Installing phpseclib/phpseclib (2.0.33): Extracting archive
- Installing civicrm/civicrm-cxn-rpc (v0.20.12.01): Extracting archive
- Installing zetacomponents/base (1.9.3): Extracting archive
- Installing zetacomponents/mail (1.9.2): Extracting archive
- Installing xkerman/restricted-unserialize (1.1.12): Extracting archive
- Installing tplaner/when (v3.0.0): Extracting archive
- Installing totten/ca-config (v17.05.0): Extracting archive
- Installing tecnickcom/tcpdf (6.4.2): Extracting archive
- Downgrading symfony/finder (v5.3.4 => v4.4.27): Extracting archive
- Installing symfony/polyfill-php81 (v1.23.0): Extracting archive
- Installing symfony/config (v4.4.27): Extracting archive
- Installing psr/simple-cache (1.0.1): Extracting archive
- Installing phpoffice/phpword (0.18.2): Extracting archive
- Installing pear/validate_finance_creditcard (0.7.0): Extracting archive
- Installing pear/net_socket (1.0.14): Extracting archive
- Installing pear/net_smtp (1.9.2): Extracting archive
- Installing pear/mail_mime (1.10.10): Extracting archive
- Installing pear/mail (v1.4.1): Extracting archive
- Installing pear/log (1.13.3): Extracting archive
- Installing pear/db (v1.10.0): Extracting archive
- Installing pear/auth_sasl (v1.1.0): Extracting archive
- Installing marcj/topsort (1.1.0): Extracting archive
- Installing paragonie/random_compat (v9.99.100): Extracting archive
- Installing league/oauth2-client (2.6.0): Extracting archive
- Installing league/oauth2-google (3.0.4): Extracting archive
- Installing league/csv (9.7.1): Extracting archive
- Installing firebase/php-jwt (v5.4.0): Extracting archive
- Installing electrolinux/phpquery (0.9.6): Extracting archive
- Installing sabberworm/php-css-parser (8.3.1): Extracting archive
- Installing phenx/php-svg-lib (v0.3.3): Extracting archive
- Installing phenx/php-font-lib (0.5.2): Extracting archive
- Installing dompdf/dompdf (v1.0.2): Extracting archive
- Installing tubalmartin/cssmin (v4.1.1): Extracting archive
- Installing scssphp/scssphp (v1.6.0): Extracting archive
- Installing padaliyajay/php-autoprefixer (1.3): Extracting archive
- Installing civicrm/composer-compile-lib (v0.5): Extracting archive
- Installing civicrm/civicrm-core (5.40.2): Extracting archive
- Installing civicrm/civicrm-drupal-8 (5.40.2): Extracting archive
- Installing civicrm/civicrm-packages (5.40.2): Extracting archive
- Applying patches for adrienrn/php-mimetyper
https://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch (Update gitignore to ensure that sites that manage via git don't miss out on the important db.json file)
Could not apply patch! Skipping. The error was: Cannot apply patch https://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch
- Applying patches for zetacomponents/mail
https://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch (CiviCRM Custom Patches for ZetaCompoents mail)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
https://github.com/zetacomponents/Mail/pull/86.patch (Allow single quotes to be used in return path)
Could not apply patch! Skipping. The error was: Cannot apply patch https://github.com/zetacomponents/Mail/pull/86.patch
- Applying patches for pear/net_smtp
https://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch (Add in CiviCRM custom error message for CRM-8744)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch
- Applying patches for pear/mail_mime
https://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch (Apply patch for CRM-3133 wordwrap body to be 750 characters to apply with RFC 2821)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch
- Applying patches for pear/mail
https://raw.githubusercontent.com/civicrm/civicrm-core/36319938a5bf26c1e7e2110a26a65db6a5979268/tools/scripts/composer/patches/pear-mail.patch (Apply CiviCRM Customisations for CRM-1367 and CRM-5946)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/36319938a5bf26c1e7e2110a26a65db6a5979268/tools/scripts/composer/patches/pear-mail.patch
- Applying patches for pear/db
https://raw.githubusercontent.com/civicrm/civicrm-core/a48a43c2b5f6d694fff1cfb99d522c5d9e2459a0/tools/scripts/composer/pear_db_civicrm_changes.patch (Apply CiviCRM Customisations for the pear:db package)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/a48a43c2b5f6d694fff1cfb99d522c5d9e2459a0/tools/scripts/composer/pear_db_civicrm_changes.patch
- Applying patches for electrolinux/phpquery
https://raw.githubusercontent.com/civicrm/civicrm-core/fe45bdfc4f3e3d3deb27e3d853cdbc7f616620a9/tools/scripts/composer/patches/php74_array_access_fix_phpquery.patch (PHP7.4 Fix for array access using {} instead of [])
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/fe45bdfc4f3e3d3deb27e3d853cdbc7f616620a9/tools/scripts/composer/patches/php74_array_access_fix_phpquery.patch
Download extra files for civicrm/civicrm-core
- Downloading civicrm/civicrm-core:angular (5.40.2)
- Installing civicrm/civicrm-core:angular (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-bootstrap (5.40.2)
- Installing civicrm/civicrm-core:angular-bootstrap (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-file-upload (5.40.2)
- Installing civicrm/civicrm-core:angular-file-upload (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-jquery-dialog-service (5.40.2)
- Installing civicrm/civicrm-core:angular-jquery-dialog-service (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-mocks (5.40.2)
- Installing civicrm/civicrm-core:angular-mocks (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-route (5.40.2)
- Installing civicrm/civicrm-core:angular-route (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-sanitize (5.40.2)
- Installing civicrm/civicrm-core:angular-sanitize (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-ui-sortable (5.40.2)
- Installing civicrm/civicrm-core:angular-ui-sortable (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-ui-utils (5.40.2)
- Installing civicrm/civicrm-core:angular-ui-utils (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-unsavedchanges (5.40.2)
- Installing civicrm/civicrm-core:angular-unsavedChanges (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-xeditable (5.40.2)
- Installing civicrm/civicrm-core:angular-xeditable (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:checklist-model (5.40.2)
- Installing civicrm/civicrm-core:checklist-model (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:ckeditor (5.40.2)
- Installing civicrm/civicrm-core:ckeditor (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:crossfilter-1.3.x (5.40.2)
- Installing civicrm/civicrm-core:crossfilter-1.3.x (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:crossfilter2 (5.40.2)
- Installing civicrm/civicrm-core:crossfilter2 (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:css-color-names (5.40.2)
- Installing civicrm/civicrm-core:css-color-names (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:d3 (5.40.2)
- Installing civicrm/civicrm-core:d3 (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:d3-3.5.x (5.40.2)
- Installing civicrm/civicrm-core:d3-3.5.x (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:datatables (5.40.2)
- Installing civicrm/civicrm-core:datatables (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:dc-2.1.x (5.40.2)
- Installing civicrm/civicrm-core:dc-2.1.x (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:es6-promise (5.40.2)
- Installing civicrm/civicrm-core:es6-promise (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:ext-greenwich-bootstrap3 (3.4.1)
- Installing civicrm/civicrm-core:ext-greenwich-bootstrap3 (3.4.1): Extracting archive
- Downloading civicrm/civicrm-core:font-awesome (5.40.2)
- Installing civicrm/civicrm-core:font-awesome (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:marked (5.40.2)
- Installing civicrm/civicrm-core:marked (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:monaco-editor (5.40.2)
- Installing civicrm/civicrm-core:monaco-editor (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:google-code-prettify (5.40.2)
- Installing civicrm/civicrm-core:google-code-prettify (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:jquery (5.40.2)
- Installing civicrm/civicrm-core:jquery (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:jquery-ui (5.40.2)
- Installing civicrm/civicrm-core:jquery-ui (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:jquery-validation (5.40.2)
- Installing civicrm/civicrm-core:jquery-validation (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:json-formatter (0.7.0)
- Installing civicrm/civicrm-core:json-formatter (0.7.0): Extracting archive
- Downloading civicrm/civicrm-core:jstree (5.40.2)
- Installing civicrm/civicrm-core:jstree (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:lodash-compat (5.40.2)
- Installing civicrm/civicrm-core:lodash-compat (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:phantomjs-polyfill (5.40.2)
- Installing civicrm/civicrm-core:phantomjs-polyfill (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:select2 (5.40.2)
- Installing civicrm/civicrm-core:select2 (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:js-yaml (5.40.2)
- Installing civicrm/civicrm-core:js-yaml (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:smartmenus (5.40.2)
- Installing civicrm/civicrm-core:smartmenus (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:sms-counter (5.40.2)
- Installing civicrm/civicrm-core:sms-counter (5.40.2): Extracting archive
9 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Generating autoload files
- CiviCRM asset map
54 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
The following packages have new compilation tasks:
- civicrm/composer-compile-lib has 1 task
- civicrm/civicrm-core has 1 task
Allow these packages to compile? ([y]es, [a]lways, [n]o, [l]ist, [h]elp) a
Compiling additional files (For full details, use verbose "-v" mode.)
Compile: Generate CCL wrapper functions
Compile: Greenwich CSS (dist/bootstrap3.css)
Sync CiviCRM assets
```
</details>
Is there anything I can do about it? I have tried `composer clear-cache` as suggested in issue [core#2168](https://lab.civicrm.org/dev/core/-/issues/2168#note_50153), but to no avail.https://lab.civicrm.org/dev/drupal/-/issues/117Profiles used for editing user records in drupal 8 don't load civi javascript2021-06-14T15:53:02ZDaveDProfiles used for editing user records in drupal 8 don't load civi javascript1. Create a civi profile that has `View/Edit Drupal User Account` checked under "Used For".
1. Add the Individual birthdate field.
1. Clear drupal cache at admin/config/development/performance (otherwise the tab in the next step won't sh...1. Create a civi profile that has `View/Edit Drupal User Account` checked under "Used For".
1. Add the Individual birthdate field.
1. Clear drupal cache at admin/config/development/performance (otherwise the tab in the next step won't show up).
1. Edit any user record under /admin/people.
1. Click on the tab for the profile you made.
1. Birthdate field has no datepicker. If you turn off aggregation which is on by default you can see no civi javascript seems to be even listed (i.e. it's not a 404 or resource url issue).
Civi and civicrm-drupal-8 version is master.5.40.0https://lab.civicrm.org/dev/drupal/-/issues/123acl_entity_role entries deleted after upgrading to 5.25.02021-03-28T20:24:15Zedvanleeuwenacl_entity_role entries deleted after upgrading to 5.25.0After upgrading tot 5.25.0 all entries have been deleted on the Assign Users page. The table acl_entity_role is empty. In the log there are the following lines for each role:
```
"id" "acl_role_id" "entity_table" "entity_id" "is_active"...After upgrading tot 5.25.0 all entries have been deleted on the Assign Users page. The table acl_entity_role is empty. In the log there are the following lines for each role:
```
"id" "acl_role_id" "entity_table" "entity_id" "is_active" "log_date" "log_conn_id" "log_user_id" "log_action"
"458" "459" "civicrm_group" "175" "1" "2020-06-06 14:29:11" "286442" "2" "Delete"
```
I am using OG Sync which did not have any problems previously.https://lab.civicrm.org/dev/drupal/-/issues/37Drupal8: Clear Drupal caches after enabling extension2021-03-26T10:46:30ZcolemanwDrupal8: Clear Drupal caches after enabling extensionAfter enabling an extension (e.g. KAM) new menu callbacks are registered in `civicrm_menu` but not in Drupal, resulting in a 404 Not Found error when visiting pages provided by the extension. Manually clearing the Drupal cache fixes this...After enabling an extension (e.g. KAM) new menu callbacks are registered in `civicrm_menu` but not in Drupal, resulting in a 404 Not Found error when visiting pages provided by the extension. Manually clearing the Drupal cache fixes this.
I suspect that Drupal caches are not being adequately cleared by CiviCRM, which is probably a low-level problem affecting more than just this.https://lab.civicrm.org/dev/drupal/-/issues/141Drupal 8 hook_uninstall not implemented2021-03-15T15:49:45ZDaveDDrupal 8 hook_uninstall not implementedUninstalling civi using the UI or drush doesn't currently uninstall anything it just tells drupal basically to uncheck the box on the modules list page, but all the data is still there. This leaves drupal+civi in an inconsistent state an...Uninstalling civi using the UI or drush doesn't currently uninstall anything it just tells drupal basically to uncheck the box on the modules list page, but all the data is still there. This leaves drupal+civi in an inconsistent state and trying to check the box again leads to a borked UI because civi keeps trying to do a first run but can't because as far as it's concerned it's already installed.
In drupal 7 hook_uninstall is implemented and drops all the civi tables.
https://github.com/civicrm/civicrm-drupal-8/pull/45#issuecomment-6989822575.37.0https://lab.civicrm.org/dev/drupal/-/issues/157Drupal 9 installation errors2021-03-11T21:48:29ZsadashivDrupal 9 installation errorsAs per the documentation at https://docs.civicrm.org/installation/en/latest/drupal8/ we need a clean drupal 8 or 9 and we can do a composer install.
Steps to replicate:
1) Download composer.json and composer.lock from https://github.com...As per the documentation at https://docs.civicrm.org/installation/en/latest/drupal8/ we need a clean drupal 8 or 9 and we can do a composer install.
Steps to replicate:
1) Download composer.json and composer.lock from https://github.com/drupal/recommended-project/tree/9.1.x this gives latest drupal 9 dev and do a composer install or download and install drupal. Now we have a clean drupal 9.1 installed
2) cd /var/www/d8.example.org
3) composer config extra.enable-patching true
4) composer require civicrm/civicrm-asset-plugin:'~1.1'
5) composer require civicrm/civicrm-{core,packages,drupal-8}
Steps 2 to 5 are from the documentation.
Expected result: Civicrm packages are installed
Observed result:
````
Using version ^5.34 for civicrm/civicrm-core
Using version ^5.34 for civicrm/civicrm-packages
Using version ^5.34 for civicrm/civicrm-drupal-8
./composer.json has been updated
Running composer update civicrm/civicrm-core civicrm/civicrm-packages civicrm/civicrm-drupal-8
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 civicrm/civicrm-core ^5.34 -> satisfiable by civicrm/civicrm-core[5.34.0].
- civicrm/civicrm-core 5.34.0 requires pear/validate_finance_creditcard dev-master -> found pear/validate_finance_creditcard[dev-master] but it does not match your minimum-stability.
Problem 2
- civicrm/civicrm-core 5.34.0 requires pear/validate_finance_creditcard dev-master -> found pear/validate_finance_creditcard[dev-master] but it does not match your minimum-stability.
- civicrm/civicrm-drupal-8 5.34.0 requires civicrm/civicrm-core >=5.21.0 -> satisfiable by civicrm/civicrm-core[5.34.0].
- Root composer.json requires civicrm/civicrm-drupal-8 ^5.34 -> satisfiable by civicrm/civicrm-drupal-8[5.34.0].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
`````
I think setting proper version for validate_finance_creditcard instead of dev-master in the composer.json file of civicrm should fix it, but as it is composer install I can't test this.
Environment details:
php: 7.4 (I know this is not completely supported but installation should go through)
mysql: 5.7
Operating system: Tried on Ubuntu and Centos.
composer version: 2.0.8
Am I missing something in the installation?
Thanks,
Sadashiv.https://lab.civicrm.org/dev/drupal/-/issues/135Use Exception handling for drush (d7) commands - specifically civicrm-upgrade-db2021-02-15T02:50:40ZeileenUse Exception handling for drush (d7) commands - specifically civicrm-upgrade-dbWhen there is a problem upgrading via drush this is how it looks
![Screen_Shot_2020-08-19_at_2.33.52_PM](/uploads/7f3a15ac5a07104926c78d77c9ff168d/Screen_Shot_2020-08-19_at_2.33.52_PM.png)
I think we should set exception handling 'some...When there is a problem upgrading via drush this is how it looks
![Screen_Shot_2020-08-19_at_2.33.52_PM](/uploads/7f3a15ac5a07104926c78d77c9ff168d/Screen_Shot_2020-08-19_at_2.33.52_PM.png)
I think we should set exception handling 'somewhere' & my current best guess as to where is
--- a/CRM/Upgrade/Headless.php
+++ b/CRM/Upgrade/Headless.php
@@ -30,6 +30,8 @@ class CRM_Upgrade_Headless {
set_time_limit(0);
}
+ // As long as the error scope is not deconstructed exceptions will be thrown.
+ $errorScope = CRM_Core_TemporaryErrorScope::useException();
$upgrade = new CRM_Upgrade_Form();https://lab.civicrm.org/dev/drupal/-/issues/96Add user format to CiviCRM Entity2021-02-04T19:28:45ZedvanleeuwenAdd user format to CiviCRM EntityFeature request: I would like to have the following user format added to CiviCRM Entity.
In civicrm_entity.module, function _civicrm_entity_options_username_format:
` 'nick.middle.last' => t('Nick.Middle.Last'),
'nick.middlelast'...Feature request: I would like to have the following user format added to CiviCRM Entity.
In civicrm_entity.module, function _civicrm_entity_options_username_format:
` 'nick.middle.last' => t('Nick.Middle.Last'),
'nick.middlelast' => t('Nick.MiddleLast'),`
[civicrm_entity.module](/uploads/bd29a74959e50bc5fc2411891d0a94e9/civicrm_entity.module)
In civicrm_entity.module, function civicrm_entity_action_create_user:
```
case 'nick.middle.last':
if (!empty($contact['middle_name'])) {
$params['name'] = _civicrm_entity_clean_login_name(trim($contact['nick_name']) . "." . trim($contact['middle_name']) . "." . trim($contact['last_name']));
} else {
$params['name'] = _civicrm_entity_clean_login_name(trim($contact['nick_name']) . "." . trim($contact['last_name']));
}
break;
case 'nick.middlelast':
if (!empty($contact['middle_name'])) {
$params['name'] = _civicrm_entity_clean_login_name(trim($contact['nick_name']) . "." . trim($contact['middle_name']) . trim($contact['last_name']));
} else {
$params['name'] = _civicrm_entity_clean_login_name(trim($contact['nick_name']) . "." . trim($contact['last_name']));
}
break;
```
An adapted file has been attached.https://lab.civicrm.org/dev/drupal/-/issues/90SMS limit is hardcoded at 460 but should be changeable somewhere2021-02-04T19:26:45ZjasonobrownSMS limit is hardcoded at 460 but should be changeable somewhereTwillio (and probably other sms providers) allows SMS messages up to 1600 characters, but Civi has the limit hardcoded at 460. I've verified that by simply going to CRM/SMS/Provider.php and changing MAX_SMS_CHAR from 460 to 1600 the sys...Twillio (and probably other sms providers) allows SMS messages up to 1600 characters, but Civi has the limit hardcoded at 460. I've verified that by simply going to CRM/SMS/Provider.php and changing MAX_SMS_CHAR from 460 to 1600 the system now accepts (and sends) messages up to 1600 characters. It seems logical that the character limit should able to be adjusted and stored somewhere rather than set as a static value in the code. We are currently using the larger limit, and would really like to see this implemented asap so that we can stop manually updating the code each time we update civi.https://lab.civicrm.org/dev/drupal/-/issues/57Editing contribution recorded as "Deleted Activity" when full log is enabled2021-02-04T19:23:38ZtapashEditing contribution recorded as "Deleted Activity" when full log is enabledIf an existing contribution edited when full log is enabled, it records in chage log as "Deleted Activity". Is this how it should be?If an existing contribution edited when full log is enabled, it records in chage log as "Deleted Activity". Is this how it should be?https://lab.civicrm.org/dev/drupal/-/issues/50Changing pages on Pagination from the Dashlet causes the report to go fullscreen2021-02-04T19:22:56ZmclubbChanging pages on Pagination from the Dashlet causes the report to go fullscreenAfter we updated to 5.10.3 our client reported that going to the next result (page) the dashlet would take over the full screen. There wasn't any way to minimize or close this if it was a modal. I have tested this out as well and I am ab...After we updated to 5.10.3 our client reported that going to the next result (page) the dashlet would take over the full screen. There wasn't any way to minimize or close this if it was a modal. I have tested this out as well and I am able to replicate.
Drupal 7 (latest)
CiviCRM 5.10.3
To recreate:
* Create a report that will enable pagination and make sure you can add it to the dashboard
* Add the dashlet to the dashboard
* Click on the next page or some other page that is available for the report
* You should see that it goes full screen
Thanks