Drupal issueshttps://lab.civicrm.org/dev/drupal/-/issues2022-09-09T10:08:56Zhttps://lab.civicrm.org/dev/drupal/-/issues/182Drupal 7 modules not ported to Drupal 9 yet2022-09-09T10:08:56Zluke.stewartDrupal 7 modules not ported to Drupal 9 yetCurrently there are a number of Drupal 7 modules that have not been ported to Drupal 9 as a - comes bundled with CiviCRM - code located within the CiviCRM codebase on install.
This can be seen by comparing
https://github.com/civicrm/civ...Currently there are a number of Drupal 7 modules that have not been ported to Drupal 9 as a - comes bundled with CiviCRM - code located within the CiviCRM codebase on install.
This can be seen by comparing
https://github.com/civicrm/civicrm-drupal/tree/7.x-master/modules
and
https://github.com/civicrm/civicrm-drupal-8/tree/master/modules/
Now a number of these modules it doesn't make sense to run in D9:
Views, CiviCRM OG Sync CiviCRM Engage and possibly others?
Some have a D9 module:
CiviCRM Group Roles has been set up as a stand alone project
https://www.drupal.org/project/civicrm_group_roles
CiviCRM Theme has been set up as part of the civicrm-drupal-8 codebase
CiviCRM Member Roles has been proposed as a PR to the drupal-8 repo but this has been stalled for a while now.
https://github.com/civicrm/civicrm-drupal-8/pull/66
I feel like options for modules here are now:
- A) 🍎 Set up as a stand alone project leave it to Site Builders/Maintainers as to whether to install or not.
- B) 🍌 Set up as a stand alone project but require as a dependency via composer so code gets installed when installing CiviCRM
Do we have criteria for deciding which option in general?
Do we have criteria for deciding which option should be applied in the case of CiviCRM Member Roles?
- C) 🥕 Include within the CiviCRM Drupal codebase via the civicrm/civicrm-drupal-8 project
Do we need a general criteria before deciding approach for CiviCRM Member Roles?
I think probably we would not want to use B unless we wanted something in a separate module that was required for the vast majority of installs of CiviCRM to run?
Given that there has been little appetite for CiviCRM Member Roles perhaps the approach is to split this into it's own module on the basis that most D9 sites to date are probably not using - therefore perhaps this code should not be required to be present on all CiviCRM installs.
However - we still have a lot of sites running D7 - and perhaps the sites that would use Member Roles are mainly running D7?https://lab.civicrm.org/dev/drupal/-/issues/104Drupal8 + Plesk: User path missing from cmsRootPath()2020-01-15T06:04:53ZRar9Drupal8 + Plesk: User path missing from cmsRootPath()The cmsRootPath() is not able to get absolute path, specifically the user folder portion of the path on Plesk.
This might be caused by multisite setup, function being insufficient or permission.
To fix CRON for plesk the following nee...The cmsRootPath() is not able to get absolute path, specifically the user folder portion of the path on Plesk.
This might be caused by multisite setup, function being insufficient or permission.
To fix CRON for plesk the following needs to be changed
vendor/civicrm/civicrm-core/CRM/Utils/System/Drupal8.php at line 441:
```diff
-return $civicrm_paths['cms.root']['path'];
+return realpath($_SERVER["DOCUMENT_ROOT"]) . '/'.array_slice(explode('/', $civicrm_paths['cms.root']['path']), -1)[0];
```
The cause is that in Plesk all files and directories under a domain document root directory should belong to psacln group and to the sysuser user. Where sysuser is a user of a corresponding subscription.
CIVICRM Cron only expects a chown -R www-data|psaserv .
The way to set correct permission is a correct way to fix the issue for subdomain.
This is described in the article above in step 3. https://support.plesk.com/hc/en-us/articles/115004094934https://lab.civicrm.org/dev/drupal/-/issues/97Status report update for Drupal (similar to what was done for Backdrop)2020-01-29T14:53:02ZlarynStatus report update for Drupal (similar to what was done for Backdrop)I wrote a PR for Backdrop some time back and have been meaning to check if it would be desired for Drupal 7 as well -- if so I would be happy to base a MR here off of what I did there. Here's a visual of how it looks in Backdrop's Status...I wrote a PR for Backdrop some time back and have been meaning to check if it would be desired for Drupal 7 as well -- if so I would be happy to base a MR here off of what I did there. Here's a visual of how it looks in Backdrop's Status Report page (Drupal 7 status report would obviously look a little different):
![Screen_Shot_2019-12-04_at_7.10.28_PM](/uploads/0a83d103f2aec9652797d3ce71c41345/Screen_Shot_2019-12-04_at_7.10.28_PM.jpg)
Would a version of this for Drupal 7 be accepted?https://lab.civicrm.org/dev/drupal/-/issues/52Drupal8: getUrlPath: avoid relying on the deprecated 'q' variable2020-05-27T12:49:03ZbgmDrupal8: getUrlPath: avoid relying on the deprecated 'q' variableContext: Symbiotic has an extension for theming that uses this trick to detect whether it's running in a frontend or backend form (to avoid loading our CSS on the frontend):
```
function adminimore_civicrm_config(&$config) {
$path = C...Context: Symbiotic has an extension for theming that uses this trick to detect whether it's running in a frontend or backend form (to avoid loading our CSS on the frontend):
```
function adminimore_civicrm_config(&$config) {
$path = CRM_Utils_System::getUrlPath();
$item = CRM_Core_Menu::get($path);
$resources = CRM_Core_Resources::singleton();
// if item is not known, assume it's public (e.g. wordpress shortcode)
if ($item && !CRM_Utils_Array::value('is_public', $item)) {
$resources->addStyleFile(ADMINIMORE_RESOURCE, 'css/civicrm-admin.css', 15, 'html-header');
$resources->addStyleFile(ADMINIMORE_RESOURCE, 'css/civicrm-buttons.css', 15, 'html-header');
}
$resources->addStyleFile(ADMINIMORE_RESOURCE, 'css/civicrm-menu.css', 15, 'html-header');
_adminimore_civix_civicrm_config($config);
}
```
In Drupal8, we were having weird problems where the CSS would sometimes not load. If we refreshed, it loaded, but after some time, the bug would appear again and we would stumble on a screen using the default CiviCRM CSS.
After some poking around, it seems that Drupal8 deprecated the 'q' variable, which CiviCRM is still using in `CRM_Utils_System::getUrlPath()`.
I did a quick patch to test a workaround, which so far seems to be working:
```
public static function getUrlPath() {
if (CRM_Core_Config::singleton()->userFramework == 'Drupal8') {
if (class_exists('Drupal') && \Drupal::hasContainer()) {
$path = \Drupal::service('path.current')->getPath();
// Remove '/' prefix. Ex: '/civicrm/contribute' becomes 'civicrm/contribute'.
if ($path) {
$path = substr($path, 1);
// Remove the language prefix, if present
// The URL returned by Drupal randomly includes the language prefix, sometimes not.
if (preg_match('/^\w\w\//', $path)) {
$path = substr($path, 3);
}
return $path;
}
}
}
if (isset($_GET[CRM_Core_Config::singleton()->userFrameworkURLVar])) {
return $_GET[CRM_Core_Config::singleton()->userFrameworkURLVar];
}
return NULL;
}
```
A cleaner solution might be to check if the `$config->userSystem->getUrlPath()` function exists, and if it does, call it?https://lab.civicrm.org/dev/drupal/-/issues/25View Relationship Type: Event to Participant Contact2020-07-16T17:23:38ZjohnffView Relationship Type: Event to Participant ContactSuccess! I have successfully added a new View Relationship type that allows you to connect a Contact to your Event, and even select it by role id.
But! Only the contact's core fields are in. Now, we can easily create another relationshi...Success! I have successfully added a new View Relationship type that allows you to connect a Contact to your Event, and even select it by role id.
But! Only the contact's core fields are in. Now, we can easily create another relationship to bring in the Contact's custom fields, but I can't see any barrier to bringing them in by default. How are custom fields connected to a table?https://lab.civicrm.org/dev/drupal/-/issues/24[webform_civicrm] - monies display properly but don't get processed when usin...2020-07-16T17:23:38ZKarinG[webform_civicrm] - monies display properly but don't get processed when using webform_calculator module to calculate e.g. participant fees![image](/uploads/c6a3f46f1ca9a57819370b9c3f4012dd/image.png)
![image](/uploads/ed87bfaed0cda7b8e3061573c4168735/image.png)
![image](/uploads/7ca2158df886d944766a86459a23be2f/image.png)
![image](/uploads/f7eb9556cd07695f72bed3f28ab4c8...![image](/uploads/c6a3f46f1ca9a57819370b9c3f4012dd/image.png)
![image](/uploads/ed87bfaed0cda7b8e3061573c4168735/image.png)
![image](/uploads/7ca2158df886d944766a86459a23be2f/image.png)
![image](/uploads/f7eb9556cd07695f72bed3f28ab4c8dd/image.png)
![image](/uploads/595a14b6ec110408df2560e23fce1673/image.png)colemanwcolemanwhttps://lab.civicrm.org/dev/drupal/-/issues/16[webform_civicrm] - edits to 'cart' display when using installments functiona...2020-07-16T17:23:38ZKarinG[webform_civicrm] - edits to 'cart' display when using installments functionalityWorking on this with CompuCorp
**Before:**
![image](/uploads/7ed8454c61bf9b3b098e7281d7e1b5ca/image.png)
Imagine this was configured as pay in 2 installments (two payments of $96/each) - how about something like this:
**After:**
![im...Working on this with CompuCorp
**Before:**
![image](/uploads/7ed8454c61bf9b3b098e7281d7e1b5ca/image.png)
Imagine this was configured as pay in 2 installments (two payments of $96/each) - how about something like this:
**After:**
![image](/uploads/73dc36a7fb0d1e6b590f77bb666f2a0e/image.png)