Drupal issueshttps://lab.civicrm.org/dev/drupal/-/issues2021-09-01T21:02:42Zhttps://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/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/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/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
Thankshttps://lab.civicrm.org/dev/drupal/-/issues/145Action dropdown menu no longer working after upgrade from 5.29.x to 5.30.12021-01-15T23:20:39ZbkeevilAction dropdown menu no longer working after upgrade from 5.29.x to 5.30.1The site is using Drupal 8 with the composer install. Running a composer upgrade to 5.30.1 has caused the action dropdown menus to stop working everywhere they are used. See screenshot.
Nothing in the web browser console logs. Nothing ...The site is using Drupal 8 with the composer install. Running a composer upgrade to 5.30.1 has caused the action dropdown menus to stop working everywhere they are used. See screenshot.
Nothing in the web browser console logs. Nothing in apache error logs. Turned error reporting on in CiviCRM and got nothing.
![Screenshot_from_2020-11-12_15-23-58](/uploads/04285ca287009ab295ce73ef2a42a9ae/Screenshot_from_2020-11-12_15-23-58.png)https://lab.civicrm.org/dev/drupal/-/issues/148When creating Premium - requiring subscription even for "physical" premiums2020-12-02T20:14:25ZplanetwebbWhen creating Premium - requiring subscription even for "physical" premiumsWhen trying to add a new Premium (first one), I get the error "Please enter a Period Type" - even though the premium is a regular "product" and not a subscription.
Civi 5.31 / Drupal 7.73 / PHP 7.3
It has been reproduced by another us...When trying to add a new Premium (first one), I get the error "Please enter a Period Type" - even though the premium is a regular "product" and not a subscription.
Civi 5.31 / Drupal 7.73 / PHP 7.3
It has been reproduced by another user with 5.31, his workaround is to submit dummy subscription info just to submit.
![Screen_Shot_2020-11-20_at_10.08.59_AM](/uploads/8ae8ed5da027f8fd5e550f3ea5185971/Screen_Shot_2020-11-20_at_10.08.59_AM.png)5.32.0https://lab.civicrm.org/dev/drupal/-/issues/149D8/D9 Fix Session Start Handling2020-11-30T23:13:25ZseamusleeD8/D9 Fix Session Start HandlingAt present because there is no override in the Drupal8 system class, the DrupalBase SessionStart function is used instead which uses functions and session related code that is not suitable for Drupal8 and can cause Session Already Starte...At present because there is no override in the Drupal8 system class, the DrupalBase SessionStart function is used instead which uses functions and session related code that is not suitable for Drupal8 and can cause Session Already Started notices in watchdog if you use cron.php to execute your cron job.5.33.0seamusleeseamusleehttps://lab.civicrm.org/dev/drupal/-/issues/105Drupal 8 routes don't rebuild automatically2020-11-04T20:41:28ZjohnkDrupal 8 routes don't rebuild automaticallyI use CiviCRM 5.21.1 with Drupal 8.8. Oftentimes, after I upgrade an extension, I have to run this command:
`drush ev '\Drupal::service("router.builder")->rebuild();'`
My questions are: does this occur automatically for upgrades to Civ...I use CiviCRM 5.21.1 with Drupal 8.8. Oftentimes, after I upgrade an extension, I have to run this command:
`drush ev '\Drupal::service("router.builder")->rebuild();'`
My questions are: does this occur automatically for upgrades to CiviCRM itself? It seems like maybe it does. I think, in that case, it should be automatic for extension upgrades, as well.
At the very least this command needs to be documented somewhere. I did a Google search, and all I found was some of my old bug reports!https://lab.civicrm.org/dev/drupal/-/issues/18Installation permissions problem2020-10-15T04:43:56ZTony Maynard-SmithInstallation permissions problemHello,
I have just installed CiviCRM 5.0.2 for Drupal, on a new clean install of Drupal 7.59. It failed saying that I needed the 'administer site administration' permission. I logged out and in again (as site admin), and also gave mys...Hello,
I have just installed CiviCRM 5.0.2 for Drupal, on a new clean install of Drupal 7.59. It failed saying that I needed the 'administer site administration' permission. I logged out and in again (as site admin), and also gave myself the permission as an Authorised User, but it still failed.
I managed to install it by commenting out lines 268 to 273 in the install script, and it seems to be working Ok.
Regards, Tonyhttps://lab.civicrm.org/dev/drupal/-/issues/137D8 Install checks run via Drupal Status Report - give misleading warnings.2020-10-14T13:50:13Zluke.stewartD8 Install checks run via Drupal Status Report - give misleading warnings.**Problem:**
If the civicrm.settings.php file is not writable, a warning is showing on Drupal Status Report indicating that the civicrm.settings.php file should be writable by the webserver user. This also shows on the command line when...**Problem:**
If the civicrm.settings.php file is not writable, a warning is showing on Drupal Status Report indicating that the civicrm.settings.php file should be writable by the webserver user. This also shows on the command line when running some drush commands.
**Ideal solution:**
The reverse behaviour should be present. Ideally we should warn if civicrm.settings.php is writable by the web server user.
The drupal hook requirements is what is generating this error message.
**Details:**
There is an argument passed to this hook `$phase` that would allow us to target this behaviour.
Currently the behaviour is to use \Civi\Setup checkRequirements() which runs Civicrm Core's install requirements checks.
There is possibly some use in some of these requirements being checked and warnings displayed on the Drupal Status Report page - however there is currently no easy way to differentiate between checks that should only run at install time like the writability of civicrm.settings.php and those that make sense to run post install as well.
Currently the check to see if the user is authorised to run the install only runs when phase is set to install.
An initial solution is potentially to only run the check requirements on install. Then if additional metadata can be returned by `$setup->checkRequirements()->getMessages()` as to whether the warning should run on install or runtime, or checks performed inside civicrm core requirements checks to test for if civi is installed the change could be reverted.5.32.0https://lab.civicrm.org/dev/drupal/-/issues/132Drupal 8 Profile menu items2020-10-04T04:46:49ZAlanDixonDrupal 8 Profile menu itemsWhen using the CiviCRM profiles for "View/Edit Drupal User Account", the tab generated on the user page doesn't use the 'public title'.
Fix on line 40 of
src/Plugin/Derivative/LocalTasks.php
change uf_group['title'] to uf_group['fronten...When using the CiviCRM profiles for "View/Edit Drupal User Account", the tab generated on the user page doesn't use the 'public title'.
Fix on line 40 of
src/Plugin/Derivative/LocalTasks.php
change uf_group['title'] to uf_group['frontend_title']5.31.0https://lab.civicrm.org/dev/drupal/-/issues/114Installing drupal 8 using civicrm-setup leads to "incorrect resource url" sys...2020-08-17T04:43:57ZDaveDInstalling drupal 8 using civicrm-setup leads to "incorrect resource url" system status check errorsWhat the check is doing is evaluating `CRM_Core_Config::singleton()->userFrameworkResourceURL` as part of computing the path to the packages folder, but here that evaluates to `[cms.root]/libraries/civicrm/core/`, which in drupal 8 is se...What the check is doing is evaluating `CRM_Core_Config::singleton()->userFrameworkResourceURL` as part of computing the path to the packages folder, but here that evaluates to `[cms.root]/libraries/civicrm/core/`, which in drupal 8 is separated from packages.
One possibility is to instead evaluate `[civicrm.packages]`, i.e. line https://github.com/civicrm/civicrm-core/blob/5.23.3/CRM/Utils/Check/Component/Env.php#L867 should change to:
`$arrowUrl = \Civi::paths()->getUrl('[civicrm.packages]/jquery/css/images/arrow.png', 'absolute');`
I'm just not sure if that then works with other CMSs. Alternatively maybe it should check for something in core?5.29.0https://lab.civicrm.org/dev/drupal/-/issues/107Drupal8: Cannot use CiviCRM after installation. Must logout/login.2020-08-07T03:28:13ZtottenDrupal8: Cannot use CiviCRM after installation. Must logout/login.Overview
----------------------------------------
After performing the installation of Civi-D8, all potential Civi users need to logout/login - otherwise they will get weird error messages.
This issue was previously reported by Mark Ha...Overview
----------------------------------------
After performing the installation of Civi-D8, all potential Civi users need to logout/login - otherwise they will get weird error messages.
This issue was previously reported by Mark Hanna in JIRA as https://issues.civicrm.org/jira/browse/CRM-19878 and it seems to have gotten dropped in the JIRA/Gitlab transition.
Reproduction steps
----------------------------------------
1. Setup a D8 site - include the CiviCRM code but *do not* activate it yet
* I used `civibuild`'s `d8prj-re` type but hacked the `app/config/d8prj-re/install.sh` to skip CiviCRM installation
2. Login to the web UI
3. Activate the `civicrm` module
4. Navigate to `/civicrm/dashboard`
Current behaviour
----------------------------------------
The screen displays an error:
> Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing
> DB Constraint Violation - contact_id should possibly be marked as mandatory for DashboardContact,create API. If so, please raise a bug report.
This is because the currently logged-in user does not have a synchronized contact record (i.e. nothing in `civicrm_uf_match`).
The current work-around is to use out-of-band docs (ex: [roundearth/drupal-civicrm-project README](https://gitlab.com/roundearth/drupal-civicrm-project#installing-civicrm)) and tell the admin to logout/login.
Expected behaviour
----------------------------------------
The record in `civicrm_uf_match` should be auto-created.
In D7, it does so. It's implemented by way of `civicrm_invoke()` which makes a call to `CRM_Core_BAO_UFMatch::synchronize(...)`. To wit: if you try to access any CiviCRM-based pages, then it will first check that *your user account* is synchronized.
Comments
----------------------------------------
The D8 module does do some user/contact synchronization, but only in a narrower range of cases (e.g. on-login). This is why the logout/login work-around helps.
Hypothetically, one could add a patch to the installer to trigger the sync for the current-user, but I think D7's approach is generally more robust. The former case would still be tempermental if (a) there are concurrent Drupal sessions for people who will have access to Civi or (b) you're loading DB snapshots (for dev/test or backup-restoration) in which the user/contact have not yet been sync'd.
5.24.0https://lab.civicrm.org/dev/drupal/-/issues/91Drupal8: Buggy behavior if user account is created without email address2020-08-07T03:28:13ZJonGoldDrupal8: Buggy behavior if user account is created without email addressIn Drupal 8, the email address isn't a required field. However, if an email address isn't specified, then the `civicrm_uf_match` record isn't created, the corresponding CiviCRM contact isn't created, and this leads to some very buggy be...In Drupal 8, the email address isn't a required field. However, if an email address isn't specified, then the `civicrm_uf_match` record isn't created, the corresponding CiviCRM contact isn't created, and this leads to some very buggy behavior, such as the dashboard showing multiple dashboards (see https://lab.civicrm.org/dev/drupal/issues/54#note_23706), which I imagine is because `civicrm_dashboard_contact` is being queried by contact ID, and finding none, simply loads all dashlets for all users.
I think the correct way to handle this is to use a Drupal hook to make the email address required.5.29.0https://lab.civicrm.org/dev/drupal/-/issues/131Error: Class 'CRM_Upgrade_Incremental_General' not found in Civi\Install\Requ...2020-08-05T11:04:31ZRob_SError: Class 'CRM_Upgrade_Incremental_General' not found in Civi\Install\Requirements->checkMysqlVersion()Hi, I am getting this error message with Civi installed on a Drupal 8 site:
Error: Class 'CRM_Upgrade_Incremental_General' not found in Civi\Install\Requirements->checkMysqlVersion()
(line 294 of [path]/vendor/civicrm/civicrm-core/Civi/...Hi, I am getting this error message with Civi installed on a Drupal 8 site:
Error: Class 'CRM_Upgrade_Incremental_General' not found in Civi\Install\Requirements->checkMysqlVersion()
(line 294 of [path]/vendor/civicrm/civicrm-core/Civi/Install/Requirements.php)
I'm currently on 5.26.2. The problem happened a couole of upgrades back - sorry I cannot remember what versions I was upgrading from and too, but it is kept up to date.
The problem only really manifests when I run the Drupal update.php script (essential after upgrading core and modules), plus also on other rare occasions like once when I had to rebuild the permissions.
I have checked and the CRM_Upgrade_Incremental_General class is there, and the file permissions look ok, so I am guessing the problem is with the class loader, but I do not have any experience of how this works. I would be greatful if someone could give me a tip on how to fix this?
I can get round it for now by putting a 'return' statement at the beginning of the relevant function in the Requirements.php file, so can run the upgrade script, so it is not urgent.5.28.0https://lab.civicrm.org/dev/drupal/-/issues/26Double quote (") should not be escaped in CIVICRM_UF_DSN in civicrm.settings.php2020-07-16T17:23:38ZsomnolentsurferDouble quote (") should not be escaped in CIVICRM_UF_DSN in civicrm.settings.phpI'm a complete newbie to both CiviCRM and Drupal, but I've been trying to test out an installation for one of my clients. I completed a fresh, standard installation of Drupal 7, then followed the installation process for CiviCRM in the S...I'm a complete newbie to both CiviCRM and Drupal, but I've been trying to test out an installation for one of my clients. I completed a fresh, standard installation of Drupal 7, then followed the installation process for CiviCRM in the System Administrator Guide.
Once installation was complete, and I had filled in all the details of my database paths and users as requested, I tried to follow the process for setting up scheduled jobs at https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/ using either the CLI or HTTP method.
Whatever I tried, every attempt to run Job.execute resulted in 'DB Error: connect failed'.
With the help of this StackExchange thread (https://civicrm.stackexchange.com/questions/25575/db-error-connect-failed-when-trying-to-call-job-execute-using-cli-php/) I tracked down the logs and discovered that MySQL was rejecting the password of the Drupal database user.
On looking up the password in CIVICRM_UF_DSN in civicrm.settings.php I noticed that a double quote character (") in my password was escaped with a backslash, even though the instructions in the file only say single quote (') or backslash (\) characters should be escaped. Taking the backslash out of the password allowed Job.execute to run as expected.
I had never touched civicrm.settings.php before, so it seems that whichever script had translated the password I entered in the GUI during installation into that file must have erroneously escaped the double quote.https://lab.civicrm.org/dev/drupal/-/issues/22Drupal8: implement views and multilingual CiviCRM2020-07-16T17:23:38ZbgmDrupal8: implement views and multilingual CiviCRMHow to reproduce:
* Create a bilingual Drupal site, with the locale module
* Setup CiviCRM as multilingual, bilingual, using URL prefix language detection (example.org/fr/civicrm)
* Create a view of CiviCRM Events, add the title field.
...How to reproduce:
* Create a bilingual Drupal site, with the locale module
* Setup CiviCRM as multilingual, bilingual, using URL prefix language detection (example.org/fr/civicrm)
* Create a view of CiviCRM Events, add the title field.
Result: fatal database error because it cannot find `civicrm_event.title` (should be `civicrm_event.title_en_US`).
This was a quickfix, incoming PR.
cc @JoeMurray @monish.deb @samuelsovbgmbgmhttps://lab.civicrm.org/dev/drupal/-/issues/19Drupal8: Implement set UF locale/language (affects mailing tokens)2020-07-16T17:23:38ZbgmDrupal8: Implement set UF locale/language (affects mailing tokens)This is a follow-up to dev/drupal#17.
How to reproduce:
* Create a bilingual Drupal site, with the locale module, with URL-prefix language detection (example.org/fr/civicrm)
* Enable multi-lingual CiviCRM, with two languages (ex: FR/EN...This is a follow-up to dev/drupal#17.
How to reproduce:
* Create a bilingual Drupal site, with the locale module, with URL-prefix language detection (example.org/fr/civicrm)
* Enable multi-lingual CiviCRM, with two languages (ex: FR/EN)
* Send a mailing in French, with the unsubscribe URL token
Expected result: the token should link to the page in French.
Related JIRA issue for Drupal7: https://issues.civicrm.org/jira/browse/CRM-16352
cc @monish.deb @samuelsov5.15.0bgmbgm